Node JS Cannot find module 'node-properties-parser' Error while running as normal user in Amazon Linux
10,785
Thanks. Finally i found the answer, it's working when in run sudo npm install node-properties-parser
without the -g
option. But still i don't know why the -g
option is not woking, in the docs it's given as install globally
.
Comments
-
Vaisakh PS almost 2 years
I have installed
node-properties-parser
globally by runningnpm install -g node-properties-parser
as normal user(vaisakh). Then i ran mytest.js
file with the commandnode test.js
now it's throwing the errorError: Cannot find module 'node-properties-parser' at Function.Module._resolveFilename (module.js:476:15) at Function.Module._load (module.js:424:25) at Module.require (module.js:504:17) at require (internal/module.js:20:19) at Object.<anonymous> (/data02/bamboo/test.js:3:12) at Module._compile (module.js:577:32) at Object.Module._extensions..js (module.js:586:10) at Module.load (module.js:494:32) at tryModuleLoad (module.js:453:12) at Function.Module._load (module.js:445:3)
I ran the above
npm install -g node-properties-parser
as root user and run thenode test.js
here it's working fine. But why it's throwing the error while running as normal user? -
buggy_coder almost 3 yearsnever use 'sudo' while doing npm i