Npm link not working


npm ERR! path /app
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '/app' -> '/opt/nvm/versions/node/v8.15.1/lib/node_modules/nil-js'
npm ERR!  { Error: EACCES: permission denied, symlink '/app' -> '/opt/nvm/versions/node/v8.15.1/lib/node_modules/nil-js'
npm ERR!   stack: 'Error: EACCES: permission denied, symlink \'/app\' -> \'/opt/nvm/versions/node/v8.15.1/lib/node_modules/nil-js\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '/app',
npm ERR!   dest: '/opt/nvm/versions/node/v8.15.1/lib/node_modules/nil-js' }
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 (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/npm-cache/8.15.1/_logs/2019-11-20T14_51_57_046Z-debug.log

can someone tell me why?

@J-Tech-Foundation,

Did you try to install an NPM package through npm install package?

yes, it is for my custom javascript language in the works, i can send you the link to it if you could help figure it out

it is a cli btw, thats why im using npm link

Well, what happens is that Glitch denies installing packages through npm install package. It’s better to enable-pnpm and then pnpm install package.

how about for npm link?

Isn’t there any option to add the package through the Add Package button in the package.json?

it is to link commands

Hmmm…I really don’t know…

figured it out

https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally

1 Like