nodeschool / discussions

:school::speech_balloon: need help with nodeschool? or just wanna ask a question? open an issue on this repo!
489 stars 107 forks source link

Installation of `how-to-npm`, does not seem to install dependencies #2639

Open humanitiesclinic opened 1 year ago

humanitiesclinic commented 1 year ago

Error output


$ how-to-npm

node:internal/modules/cjs/loader:1024
  throw err;
  ^

Error: Cannot find module 'rimraf'
Require stack:
- /usr/local/lib/node_modules/how-to-npm/index.js
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1021:15)
    at Function.Module._load (node:internal/modules/cjs/loader:866:27)
    at Module.require (node:internal/modules/cjs/loader:1093:19)
    at require (node:internal/modules/cjs/helpers:108:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/how-to-npm/index.js:39:14)
    at Module._compile (node:internal/modules/cjs/loader:1191:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1245:10)
    at Module.load (node:internal/modules/cjs/loader:1069:32)
    at Function.Module._load (node:internal/modules/cjs/loader:904:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/usr/local/lib/node_modules/how-to-npm/index.js' ]
}

Why is this so?

morenoh149 commented 1 year ago

it seems to be on npm https://www.npmjs.com/package/rimraf

nutjob4life commented 10 months ago

how-to-npm fails for me, too:

$ sw_vers
ProductName:    macOS
ProductVersion:   14.2.1
BuildVersion:   23C71
$ node --version
v21.5.0
$ npm --version
10.2.4
$ npm install -g how-to-npm
npm WARN deprecated uuid@2.0.3: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

added 75 packages in 3s

3 packages are looking for funding
  run `npm fund` for details
npm notice 
npm notice New patch version of npm available! 10.2.4 -> 10.2.5
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.2.5
npm notice Run npm install -g npm@10.2.5 to update!
npm notice 
$ how-to-npm

┌──────────────────────────────────────────────────────────┐
│              how-to-npm update check failed              │
│           Try running with sudo or get access            │
│           to the local update config store via           │
│ sudo chown -R $USER:$(id -gn $USER) /Users/kelly/.config │
└──────────────────────────────────────────────────────────┘
node:internal/modules/cjs/loader:1146
  throw err;
  ^

Error: Cannot find module 'workshopper-adventure/adventure'
Require stack:
- /usr/local/lib/node_modules/how-to-npm/index.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
    at Module._load (node:internal/modules/cjs/loader:984:27)
    at Module.require (node:internal/modules/cjs/loader:1234:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/usr/local/lib/node_modules/how-to-npm/index.js:15:17)
    at Module._compile (node:internal/modules/cjs/loader:1375:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/usr/local/lib/node_modules/how-to-npm/index.js' ]
}

Node.js v21.5.0

Running with sudo gives the same error and stack trace.

jpugh020 commented 8 months ago

I guess something is preventing how-to-npm from including it's required dependencies. I had to go in and manually install npm install -g module_name them one by one, after which how-to-npm works fine.

all 7 dependencies can be found here: https://www.npmjs.com/package/how-to-npm?activeTab=dependencies