fnm
fnm copied to clipboard
EACCESS permission denied when running as root
I'm running on linux and I need to run npm start
as root. When I do this I get this error:
$ npm start
internal/fs/utils.js:259
throw err;
^
Error: EACCES: permission denied, stat '/tmp/fnm-shell-9197360'
at Object.realpathSync (fs.js:1674:9)
at toRealPath (internal/modules/cjs/loader.js:369:13)
at Function.Module._findPath (internal/modules/cjs/loader.js:673:22)
at resolveMainPath (internal/modules/run_main.js:12:25)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:65:24)
at internal/main/run_main_module.js:17:47 {
errno: -13,
syscall: 'stat',
code: 'EACCES',
path: '/tmp/fnm-shell-9197360'
}
$ ls -l /tmp/fnm-shell*
lrwxrwxrwx 1 rjs rjs 49 30 mei 11:49 /tmp/fnm-shell-9197360 -> /home/rjs/.fnm/node-versions/v14.3.0/installation
$ ls -ld /home/rjs/.fnm/node-versions/v14.3.0/installation
drwxr-xr-x 6 rjs rjs 4096 19 mei 21:17 /home/rjs/.fnm/node-versions/v14.3.0/installation
What can I do to debug this?
I can't find an easy way to run without fnm
. I didn't have any issues when running nvm.
Removing fnm from my $PATH
and installing a system nodejs
enabled my to run npm start
as root again. But I expect there to be an easier way to remove fnm from my path. fnm
should also work when running as root.
hey, are there still issues when running as root?