admin管理员组文章数量:1392007
I have installed node-properties-parser
globally by running npm install -g node-properties-parser
as normal user(vaisakh). Then i ran my test.js
file with the mand node test.js
now it's throwing the error
Error: 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._pile (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 the node test.js
here it's working fine. But why it's throwing the error while running as normal user?
I have installed node-properties-parser
globally by running npm install -g node-properties-parser
as normal user(vaisakh). Then i ran my test.js
file with the mand node test.js
now it's throwing the error
Error: 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._pile (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 the node test.js
here it's working fine. But why it's throwing the error while running as normal user?
1 Answer
Reset to default 3Thanks. 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
.
本文标签:
版权声明:本文标题:javascript - Node JS Cannot find module 'node-properties-parser' Error while running as normal user in Amazon Li 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744747767a2622990.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论