Open XFrineX opened 1 year ago
Currently we don't allow installing packages globally because of permissions. It also doesn't make a lot of sense because every time you refresh the project, the global packages are gone.
Just install nodemon as a regular package with npm install nodemon
. We automatically expose all binaries from node_modules/.bin
of your project, so you can just type nodemon
and it should work fine.
Nonetheless, I'll create an internal ticket so we can at least support npm install -g
in the future.
Describe the bug
I can't install nodemon
Result:
`npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /usr/local/lib/node_modules/nodemon/node_modules/chokidar npm ERR! errno -13 npm ERR! EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon/node_modules/chokidar' npm ERR! [EACCES: permission denied, mkdir '/usr/local/lib/node_modules/nodemon/node_modules/chokidar'] { npm ERR! code: 'EACCES', npm ERR! errno: -13, npm ERR! path: '/usr/local/lib/node_modules/nodemon/node_modules/chokidar', npm ERR! syscall: 'mkdir' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.
npm ERR! A complete log of this run can be found in: npm ERR! /home/.npm/_logs/2023-06-20T23_27_01_298Z-debug-0.log jsh: spawn npm EACCES`
Link to the blitz that caused the error
https://stackblitz.com/edit/stackblitz-starters-vfu1ax?description=Starter%20project%20for%20Node.js,%20a%20JavaScript%20runtime%20built%20on%20Chrome%27s%20V8%20JavaScript%20engine&file=src%2Findex.js,.env,package.json&title=node.new%20Starter
Steps to reproduce
type
npm install -g nodemon
Expected behavior
install it
Parity with Local
Screenshots
No response
Platform
Additional context
No response