#How to install npm dev dependencies?

1 messages · Page 1 of 1 (latest)

gleaming magnet
#

I try to install keysely-codegen using deno add -D npm:kysely-codegen but everytime it adds the dependency to my regular imports in the deno.json, which looks like this:

{
  "nodeModulesDir": "auto",
  "tasks": {
    "dev": "deno run --watch main.ts"
  },
  "imports": {
    "hono": "npm:hono@^4.6.11",
    "kysely": "npm:kysely@^0.27.4",
    "kysely-codegen": "npm:kysely-codegen@^0.17.0",
    "pg": "npm:pg@^8.13.1",
    "@types/pg": "npm:@types/pg@^8.11.10",
    "pg-pool": "npm:pg-pool@^3.7.0"
  }
}

what am I doing wrong here? I still have a hard time how the npm stuff works with deno

meager forge
#

There is no separation in the imports within deno.json. One isn't needed for Deno as only the dependencies actually used are actually loaded when ran or compiled when built. Etc