Issue
I'm having issues with my new linux setup - I've installed nodemon as a local dependency (NOT globally) and I'm trying to execute it from my package.json "start"-script. I'm getting this permission error.
node
by itself works great, but as soon as I try to use babel-node
or nodemon
or even mocha
, I get permission problems.
My setup is divided across 2 hard drives - node is installed on my SSD (with my OS), and my project (and it's node_modules, where I'm trying to execute nodemon
from is on my storage-HDD.
sh: 1: nodemon: Permission denied
npm ERR! Linux 3.19.0-56-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v5.9.0
npm ERR! npm v3.7.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `nodemon --exec node entry`
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the [email protected] start script 'nodemon --exec node entry'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vyggo-easyrtc package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! nodemon --exec node entry
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs vyggo-easyrtc
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls vyggo-easyrtc
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /media/goatic/HDD/Projects/Node/vyggo-easyrtc/npm-debug.log
goatic@goatic-laptop:/media/goatic/HDD/Projects/Node/vyggo-easyrtc$
Solution
My secondary drive was incompatible with my linux OS in terms of permissions, as it was an NTFS partition.
I ended up moving everything to my primary drive, and of course permissions were working again, allowing me to execute local dependencies.
I guess the solution to my problem, had I relied on keeping projects on the secondary drive, would be to format it to a format compatible with Linux permissions.
Answered By - Goatic Answer Checked By - Mildred Charles (WPSolving Admin)