#Mono Repo - Enable Paths

14 messages · Page 1 of 1 (latest)

outer jolt
spare hill
#

Checklist:

  • installed Deno?
  • installed Deno VS code extension?
  • correct path specified in settings.json?

You could also enable Deno for the whole workspace using Ctrl + Shift + P > Deno: Enable and see if that works first hand.

outer jolt
#
vscode ➜ /workspaces/backend (feat/sunsynk-support) $ deno --version
deno 1.45.0 (release, aarch64-unknown-linux-gnu)
v8 12.7.224.12
typescript 5.5.2

this is the workspace file

{
  "folders": [
    {
      "name": "project-root",
      "path": "./"
    },
    {
      "name": "supabase",
      "path": "supabase"
    },
    {
      "name": "supabase-functions",
      "path": "supabase/functions"
    },
    {
      "name": "automation",
      "path": "automation"
    },
    {
      "name": "infrastructure",
      "path": "infrastructure"
    },
    {
      "name": "utils",
      "path": "utils"
    }
  ],
  "settings": {
    "files.exclude": {
      "supabase": true,
      "functions": true,
      "automation": true,
      "infrastructure": true,
      "utils": true
    },
    //"deno.enable": false,
    //"deno.enablePaths": ["supabase-functions"],
    //"deno.importMap": "./supabase/functions/import_map.json"
  } 
}

#

Starting Deno language server...
version: 1.45.0 (release, aarch64-unknown-linux-gnu)
executable: /usr/local/bin/deno
Connected to "Visual Studio Code" 1.91.0
Enabling import suggestions for: https://deno.land
Refreshing configuration tree...
Resolved package.json: "/workspaces/backend/package.json"
Could not set npm package requirements: Error getting response at https://registry.npmjs.org/@types/node for package "@types/node": An npm specifier not found in cache: "@types/node", --cached-only is specified.
Could not set npm package requirements: Error getting response at https://registry.npmjs.org/@types/node for package "@types/node": An npm specifier not found in cache: "@types/node", --cached-only is specified.
Server ready.

Deno

Deno features improved security, performance, and developer experience compared to its predecessor. It's a great time to upgrade your Node.js project to run on Deno.

#

then if i change the workspace configuration

{
...
  ],
  "settings": {
    "files.exclude": {
      "supabase": true,
      "functions": true,
      "automation": true,
      "infrastructure": true,
      "utils": true
    },
    //"deno.enable": false,
    "deno.enablePaths": ["supabase-functions"],
    "deno.importMap": "./supabase/functions/import_map.json"
  } 
}

Enabling import suggestions for: https://deno.land
Refreshing configuration tree...
Resolved package.json: "/workspaces/backend/package.json"
Resolved import map: "file:///workspaces/backend/supabase/functions/import_map.json"
Starting Deno language server...
version: 1.45.0 (release, aarch64-unknown-linux-gnu)
executable: /usr/local/bin/deno
Connected to "Visual Studio Code" 1.91.0
Enabling import suggestions for: https://deno.land
Refreshing configuration tree...
Resolved package.json: "/workspaces/backend/package.json"
Resolved import map: "file:///workspaces/backend/supabase/functions/import_map.json"
Server ready.

{
"enable": true,
"disablePaths": [],
"enablePaths": [
"supabase-functions"
],
"cache": null,
"cacheOnSave": true,
"certificateStores": null,
"config": null,
"importMap": "./supabase/functions/import_map.json",
"codeLens": {
"implementations": false,
"references": false,
"referencesAllFunctions": false,
"test": false
},
....

Deno

Deno features improved security, performance, and developer experience compared to its predecessor. It's a great time to upgrade your Node.js project to run on Deno.

outer jolt
#

if it helps, i get this message

vscode ➜ /workspaces/backend/supabase/functions (feat/sunsynk-support) $ deno test --allow-net --allow-read --allow-env --import-map=./import_map.json ./test/*
error: Specifying an import map in a workspace via CLI flags is not implemented.

removing the package.json from the root of the mono repo, and this command works

spare hill
#

Might be related to mono repo support that was just introduced just introduced in 1.45.0. I believe there's still some issues that need addressing.

#

I belive ryan also mentioned the team is working on a fix for 1.45.1

outer jolt
#

do you have a link, maybe i can help with testing?

outer jolt
#

Hi @spare hill is this fixed now? I have installed 1.45.2 and still have the issue.

spare hill
#

well, if it's still not fixed you might wanna file an issue on GitHub

outer jolt
#

I’ll give it a watch, then if the issue is still there, I’ll log a ticket