20

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' }
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Edwin Harly
  • 439
  • 1
  • 5
  • 13

2 Answers2

28

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.

Suraj Rao
  • 29,388
  • 11
  • 94
  • 103
  • my home's partition is short on free space, unless this is the only solution I will resize my partition then – Edwin Harly Feb 24 '17 at 08:47
  • I am not sure it will work otherwise. The filesystems are different. Linux permissions are incompatible with windows file systems – Suraj Rao Feb 24 '17 at 09:15
  • 2
    Thanks for the answer, saved me a lot of time debuggein that strange error. Would say it sounds like a bug though. – Henrik Kirk Feb 28 '18 at 13:06
  • Thank you @SurajRao I really appreciate your post. I could not work it out no matter what I tried. FAT32 permissions were the problem. – NAJ Feb 08 '21 at 11:45
  • This also seems to happen with exfat. – Jason Oct 08 '22 at 14:44
9

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:

Samuel
  • 2,430
  • 5
  • 31
  • 41