npm run dev: Error: Cannot find module '../lib/cli'
DigiConvent opened this issue · comments
DigiConvent commented
When generating a new project (without having a name specified) and then running that project using npm run dev
, I get a
> express-gen-ts@0.0.0 dev
> nodemon
node:internal/modules/cjs/loader:958
throw err;
^
Error: Cannot find module '../lib/cli'
Require stack:
- /<path>/<projectname>/node_modules/.bin/nodemon
at Module._resolveFilename (node:internal/modules/cjs/loader:955:15)
at Module._load (node:internal/modules/cjs/loader:803:27)
at Module.require (node:internal/modules/cjs/loader:1021:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/<path>/<projectname>/node_modules/.bin/nodemon:3:13)
at Module._compile (node:internal/modules/cjs/loader:1119:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
at Module.load (node:internal/modules/cjs/loader:997:32)
at Module._load (node:internal/modules/cjs/loader:838:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/<path>/<projectname>/node_modules/.bin/nodemon'
]
}
Node.js v18.9.0
Running npm install
didn't help. Steps to reproduce:
npx express-generator-typescript
, run with npm run dev
.
Sean Maxwell commented
hmm, i just ran the command and I'm not able to reproduce, that error looks weird, like nodemon didn't get downloaded
Sean Maxwell commented
maybe try to clear the npx cache
Sean Maxwell commented
closing this cause haven't gotten a response for a while