Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

npm asks for useless root on npm install #13400

Closed
2 of 13 tasks
empjustine opened this issue Jul 16, 2016 · 3 comments
Closed
2 of 13 tasks

npm asks for useless root on npm install #13400

empjustine opened this issue Jul 16, 2016 · 3 comments

Comments

@empjustine
Copy link

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

Wrongly issued as (now closed) acorn issue. acornjs/acorn#437

Attempting to get https://github.com/PolymerElements/polymer-starter-kit working, I ran npm install.
As far as I know, it's a bad idea asking for root for installing random packages comming from unsigned unverified repositories such as npm.
Is this the expected behaviour?

$ cd /storage/sdcard1/Android/data/com.termux/files/polymer-starter-kit-1.3.0
$ npm install

/storage/sdcard1/Android/data/com.termux/files/polymer-starter-kit-1.3.0
└── (empty)

npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
npm ERR! Linux 3.10.49-perf-g8c57d42-dirty
npm ERR! argv "/data/data/com.termux/files/usr/bin/node" "/data/data/com.termux/files/usr/bin/npm" "install"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.5
npm ERR! path ../acorn/bin/acorn
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink

npm ERR! Error: EACCES: permission denied, symlink '../acorn/bin/acorn' -> '/storage/sdcard1/Android/data/com.termux/files/polymer-starter-kit-1.3.0/node_modules/.bin/acorn'
npm ERR!     at Error (native)
npm ERR!  { Error: EACCES: permission denied, symlink '../acorn/bin/acorn' -> '/storage/sdcard1/Android/data/com.termux/files/polymer-starter-kit-1.3.0/node_modules/.bin/acorn'
npm ERR!     at Error (native)
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '../acorn/bin/acorn',
npm ERR!   dest: '/storage/sdcard1/Android/data/com.termux/files/polymer-starter-kit-1.3.0/node_modules/.bin/acorn' }
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!     /storage/sdcard1/Android/data/com.termux/files/polymer-starter-kit-1.3.0/npm-debug.log
npm ERR! code 1

The permissions are fine.

$ ls -la node_modules/.bin/
total 96
drwxrwx---   2 u0_a150 sdcard_r 32768 Jul  8 14:50 .
drwxrwx--- 734 u0_a150 sdcard_r 65536 Jul 12 12:39 ..

The filesystem however doesn't support symbolic links and root won't change that.

How can the CLI team reproduce the problem?

Probably by attempting to install any npm package on any POSIX filesystem that doesn't allow symlinks.

supporting information:

  • npm -v prints:
    3.9.5
  • node -v prints:
    v6.2.2
  • npm config get registry prints:
    https://registry.npmjs.org/
  • Windows, OS X, or Linux?:
    Termux on Android 5.1
$ uname -a
Linux localhost 3.10.49-perf-g8c57d42-dirty #1 SMP PREEMPT Fri Apr 1 17:37:04 CST 2016 aarch64 Android
  • Network issues:
    • Geographic location where npm was run:
    • I use a proxy to connect to the npm registry.
    • I use a proxy to connect to the web.
    • I use a proxy when downloading Git repos.
    • I access the npm registry via a VPN
    • I don't use a proxy, but have limited or unreliable internet access.
  • Container:
    • I develop using Vagrant on Windows.
    • I develop using Vagrant on OS X or Linux.
    • I develop / deploy using Docker.
    • I deploy to a PaaS (Triton, Heroku).
@kenany
Copy link
Contributor

kenany commented Jul 16, 2016

@empjustine Maybe disabling symlinks with --no-bin-links can help?

@empjustine
Copy link
Author

Seems a much more specific, safer and sane error message for this kind of error.

@npm-robot
Copy link

We're closing this support issue as it has gone three days without activity. The npm CLI team itself does not provide support via this issue tracker, but we are happy when users help each other here. In our experience once a support issue goes dormant it's unlikely to get further activity. If you're still having problems, you may be better served by joining package.community and asking your question there.

For more information about our new issue aging policies and why we've instituted them please see our blog post.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants