Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NodeJS - Cannot find module 'spdx-license-ids'

I am new to nodejs, yeoman and having issue(Cannot find module 'spdx-license-ids') while using an angular generator. I have node, bower, grunt installed. Details below.

Error: Cannot find module 'spdx-license-ids'

at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (C:\Users\bdas\AppData\Roaming\npm\node_modules\generator-karma\node_modules\yeoman-generator\node_modules\read-pkg-up\node_modules\read-pkg\node_modules\normalize-package-data\node_modules\validate-npm-package-license\node_modules\spdx-correct\index.js:1:80)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300

enter image description here enter image description here

like image 343
user258427 Avatar asked Oct 19 '25 02:10

user258427


1 Answers

Not sure about grunt etc, but to simply install any node library, do:

            apt-get install npm 

from the command line, thereafter any node module should be installed with:

            npm install MODULE_NAME

e.g.:

            npm install spdx-license-ids

or to install it globally so node can find it anywhere on your system (not always such a briliiant idea, but anyways), use the global -g flag:

           npm install -g MODULE_NAME 

Those extraneous tools can trip you up sometimes - grunt, yeoman, etc

like image 172
Hektor Avatar answered Oct 21 '25 16:10

Hektor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!