5 ms·
Well think harder. Npm runs scripts from package.json. Most folks wouldn't think twice to run sudo npm start as a replacement for sudo node. I sure wouldn't thi
by tbranyen 9y ago
Well think harder. Npm runs scripts from package.json. Most folks wouldn't think twice to run sudo npm start as a replacement for sudo node. I sure wouldn't think npm would start mucking with file permissions.
- diggan 9y agoI'm sorry but that people can't figure out where to put `sudo` is not a usecase for using sudo... Instead of running `sudo npm start`, have `scripts.start` have the value `sudo node index.js` if you want. But then again, I'm not "most folks", I try to think when I am the root user and don't run third-party code willy-nilly when I am.