Skip to content

Unable to install acorn npm package (inability to symlink on mounted drives) #3

Closed
@EvHaus

Description

@EvHaus

Steps to reproduce:

  • Launch "Bash on Ubuntu on Windows" (note that it appears to use the 'root' user by default)
  • Install nodejs via: curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
  • sudo apt-get install -y nodejs
  • Try to install the acorn package via npm install acorn

You'll get this message:

npm ERR! Linux 3.4.0+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "acorn"
npm ERR! node v5.10.1
npm ERR! npm  v3.8.3
npm ERR! path ../acorn/bin/acorn
npm ERR! code EPERM
npm ERR! errno -1
npm ERR! syscall symlink

npm ERR! Error: EPERM: operation not permitted, symlink '../acorn/bin/acorn' -> '/mnt/r/path/node_modules/.bin/acorn'
npm ERR!     at Error (native)
npm ERR!  { [Error: EPERM: operation not permitted, symlink '../acorn/bin/acorn' -> '/mnt/r/path/node_modules/.bin/acorn']
npm ERR!   errno: -1,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../acorn/bin/acorn',
npm ERR!   dest: '/mnt/r/path/node_modules/.bin/acorn',
npm ERR!   parent: 'myproject' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /mnt/r/path/npm-debug.log

Not sure how to proceed as I'm already root with full permissions

UPDATE: For other nodejs developers finding this issue. Here is what I seem to have uncovered so far:

  • npm install -g {anything} doesn't seem to work
  • npm install {anything} doesn't seem to work if installing anywhere on /
  • npm install {some_packages} on /mnt/{something} sometimes doesn't work depending on whether or not that package needs to create symlinks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions