Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install Error: EPERM: operation not permitted, symlink '../mkdirp/bin/cmd.js'

Still failed even after reinstall node and npm.
Here is the full error message

npm ERR! Linux 4.8.0-34-generic
npm ERR! argv "/home/lt1pchanifa/.nvm/versions/node/v6.9.3/bin/node" "/home/lt1pchanifa/.nvm/versions/node/v6.9.3/bin/npm" "install"
npm ERR! node v6.9.3
npm ERR! npm  v4.0.5
npm ERR! path ../mkdirp/bin/cmd.js
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall symlink

npm ERR! Error: EPERM: operation not permitted, symlink '../mkdirp/bin/cmd.js' -> '/media/lt1pchanifa/B0D0-8B34/Edwin/thinkster-ng2/node_modules/@angular-cli/ast-tools/node_modules/.bin/mkdirp'
npm ERR!     at Error (native)
npm ERR!  { Error: EPERM: operation not permitted, symlink '../mkdirp/bin/cmd.js' -> '/media/lt1pchanifa/B0D0-8B34/Edwin/thinkster-ng2/node_modules/@angular-cli/ast-tools/node_modules/.bin/mkdirp'
npm ERR!     at Error (native)
npm ERR!   errno: -1,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../mkdirp/bin/cmd.js',
npm ERR!   dest: '/media/lt1pchanifa/B0D0-8B34/Edwin/thinkster-ng2/node_modules/@angular-cli/ast-tools/node_modules/.bin/mkdirp',
npm ERR!   parent: '@angular-cli/ast-tools' }
like image 663
Edwin Harly Avatar asked Feb 24 '17 08:02

Edwin Harly


People also ask

How do I fix Eperm Operation not permitted?

Find powerShell/cmd in the desktop search bar, right click and choose to run as an administrator, and then use the cd command to go to the folder where you need to perform npm install and run it again to solve the problem.

What is no bin Link?

The --no-bin-links argument will prevent npm from creating symlinks for any binaries the package might contain.


2 Answers

You are trying to run npm in a linux platform within a Windows FAT32 folder.

/media/lt1pchanifa/B0D0-8B34/Edwin/thinkster-ng2

According to github issue, permission problems occur while trying to access Windows partition. Try to move the project to Home directory which is EXT4 and run the command.

like image 134
Suraj Rao Avatar answered Oct 04 '22 06:10

Suraj Rao


I haven't tried this myself but maybe you could skip creating symlinks if it's only problem with them.

npm install --no-bin-links

See more here:

  • npm install: when to use --no-bin-links?
  • Installing npm modules in a VM shared directory and grunt issues
like image 7
Samuel Avatar answered Oct 01 '22 06:10

Samuel