简体   繁体   中英

NPM throw err 491

I have just installed node hence i run the node -v and npm -v to confirm that they have successfully been installed. node -v is returning the version of node as expected, however npm -v throws the bellow error. What can be the issue?

module.js:491
    throw err;
^

Error: Cannot find module '../lib/utils/unsupported.js'
    at Function.Module._resolveFilename (module.js:489:15)
    at Function.Module._load (module.js:439:25)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at /usr/local/lib/node_modules/npm/bin/npm-cli.js:19:21
    at Object.<anonymous> (/usr/local/lib/node_modules/npm/bin/npm-
cli.js:92:3)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)`

It might be a permissions problem, delete your local/lib/node_modules folder and reinstall node. For further info, you might wanna check out this error resolved on npm's github discussion .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM