-1

I am using npm for quite a while now, but this morning when I run npm init I get this error :

module.js:549
    throw err;
    ^

Error: Cannot find module '../lib/utils/unsupported.js'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596: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:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)

Somebody helps me!

1 Answers1

0

As the error error trace that is displayed is referencing a missing path (../lib/utils/unsupported.js), I simply decided to remove nodejs and npm altogether following the answer here How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)

After removing nodejs and npm I reinstall them using the node-v8.11.pkg installer.

It's npm init is now working fine.