Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve ini error for npm

Tags:

node.js

npm

I just install node.js to my system. My node version is v8.10.0. When I try npm -v I get following error.

module.js:549
    throw err;
    ^

Error: Cannot find module 'ini'
    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 Object.<anonymous> (C:\Users\ai8\AppData\Roaming\npm\node_modules\npm\node_modules\config-chain\index.js:4:11)
    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)
    at Function.Module._load (module.js:497:3)

How can I fix this issue?

like image 224
user1687891 Avatar asked Oct 19 '25 01:10

user1687891


1 Answers

I had a same kind of issue before. I tried all the solutions even tried uninstalling and reinstalling node js. Finally, I tried by removing the node_modules from the user folder. Then, run npm install.

This worked for me.

Hope it works for you

like image 121
nas Avatar answered Oct 21 '25 14:10

nas



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!