Bower install not recognizing local npm package?

I get the following error when starting the bower installation.

$ bower install
module.js:340
    throw err;
    ^

Error: Cannot find module 'minimist'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:289:25)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous>     (/home/ubuntu/.nvm/versions/node/v5.1.0/lib/node_modules/bower/node_modules/bower-config/node_modules/optimist/index.js:2:16)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)

I have a "minimist" installed as a local npm package, but not globally. Is there any way to get bower to recognize the local package and not set up a minimalist global approach?

+4
source share
1 answer

Running npm install -S minimistin the CLI from the project root directory should solve your problem.

0
source

Source: https://habr.com/ru/post/1618587/


All Articles