How to solve the error message 'Cannot find module' abbrev '

My question is very similar to How to resolve "I can not find the module" using Node.js? , but I can’t solve my problem using the information provided in the answer.

I try to run the grunt UNCSS plugin, but when I try to install it ( npm install grunt-uncss --save-dev ), I get the following error:

$ npm install grunt-uncss --save-dev

module.js:340
    throw err;
          ^
Error: Cannot find module 'abbrev'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/usr/local/Cellar/node/0.10.20/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:10:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

Based on the answer mentioned above, I tried to install this abbrev module both in the project folder and around the world, but this gives the same error :(

npm install -g abbrev

module.js:340
    throw err;
          ^
Error: Cannot find module 'abbrev'
    at Function.Module._resolveFilename (modu
   (ETCETERA)

The main question is: how can I solve this error?

: 1) , RUBY Node.JS? , "" Ruby...? 2) , , : 10? (http://shoogledesigns.com/blog/blog/2014/01/13/gruntjs-running-watch-task-waiting-bus-error-10/)

, . , !

+4
6

: node.js, .

Tell-tale , NPM.

+1

node-modules, , package.json, .

, :

rm -rf node-modules
npm install
+2

npm:

 sudo npm install -g npm
+2

, .

0

. node_modules . , :

rm -rf node_modules
npm install
0

Windows . Node.js( ), . rm -rf node_modules, "node_modules" , ( ).

OP . (/USR///node/0.10.20/lib/node_modules/

It was something like C: \ Users \ nick \ AppData \ Roaming \ npm \ node_modules

0
source

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


All Articles