IDEA run 'npm install'

I have used the Run 'npm install' on a package.json file when I right click. This would install packages locally. Now with the new update this seems to be broken ? It is installing packages globally. The action seems to run below command but it is installing the packages globally. 



/usr/local/lib/node_modules/npm/bin/npm-cli.js install --scripts-prepend-node-path=auto


Sorry, but this just can't happen. To install modules globally, it should have been run with -g switch. Without it, it installs modules locally. If running node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --scripts-prepend-node-path=auto installs packages globally, it's a problem with npm, not with IDE. But I haven't ever heard of such npm issues


Found the issue this seems to be with package-lock.json. I don’t know why but I need to delete this to download new dependencies.


Please sign in to leave a comment.