Deno plugin installing a lot of packages

52 views Asked by At

I'm building a Next.js project in JetBrains WebStorm. I want to use Deno to do experiments during production. I have installed Deno using Homebrew, and I have installed the Deno plugin in WebStorm.

I tried to run a script via the IDE's run tools, and Deno seems to want to download the whole of NPM before it runs the script. Is this normal? It's making me nervous.

I guess I expect it to use node_modules for anything I'm asking it to import in my script, or the files it downloaded during the Homebrew installation just to run itself, leaving little left for it to download.

I figure that either the plugin is ignoring the Homebrew installation and downloading all Deno's own dependencies (I don't really think this is the case), or it is not finding my node_modules folder and it is downloading everything in my package.json file, along with the whole dependency tree, or I have done something I shouldn't have, or not done something I should have and it is literally downloading npm!

deno.json

{
  "imports": {
    "std/": "https://deno.land/[email protected]/"
  },
  "tasks": {
    "dev": "deno run --watch main.ts"
  },
  "nodeModulesDir": true
}

import_map.json

{
  "imports": {
    "node_modules/" : "./node_modules"
  }
}

I am not 100% sure I have used these config files properly.

So... does all this downloading before running the first file seem normal?

0

There are 0 answers