Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

3.11.0 installation failure: EACCES linux-x64-11_binding.node #1780

Closed
alexjurkiewicz opened this issue Nov 3, 2016 · 11 comments
Closed

3.11.0 installation failure: EACCES linux-x64-11_binding.node #1780

alexjurkiewicz opened this issue Nov 3, 2016 · 11 comments

Comments

@alexjurkiewicz
Copy link

When reporting an bug, you must provide this information:

  • NPM version (npm -v): v3.10.8
  • Node version (node -v): v0.10.25
  • Node Process (node -p process.versions):
{ http_parser: '1.0',
  node: '0.10.25',
  v8: '3.14.5.9',
  ares: '1.9.0-DEV',
  uv: '0.10.23',
  zlib: '1.2.3',
  modules: '11',
  openssl: '1.0.1e' }
  • Node Platform (node -p process.platform): linux
  • Node architecture (node -p process.arch): x64
  • node-sass version (node -p "require('node-sass').info"):
libsass        	3.3.6  	(Sass Compiler)	[C/C++]```
- npm node-sass versions (`npm ls node-sass`):
/
`-- node-sass@3.10.1

Hi, after 3.11.0 was tagged this morning we noticed CI errors in our application. Pinning to 3.10.1 worked fine as a workaround. The error log is as follows:


> node-sass@3.11.0 install /node_modules/node-sass
> node scripts/install.js

Start downloading binary at https://github.com/sass/node-sass/releases/download/v3.11.0/linux-x64-11_binding.node

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: EACCES, open '/root/.npm/node-sass/3.11.0/linux-x64-11_binding.node'
/
`-- d@0.1.1
  `-- es5-ext@0.10.12
    +-- es6-iterator@2.0.0
    `-- es6-symbol@3.1.0

npm WARN enoent ENOENT, open '/package.json'
npm WARN !invalid#1 No description
npm WARN !invalid#1 No repository field.
npm WARN !invalid#1 No README data
npm WARN !invalid#1 No license field.
npm ERR! Linux 4.4.27-moby
npm ERR! argv "node" "/usr/bin/npm" "install" "node-sass"
npm ERR! node v0.10.25
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE

npm ERR! node-sass@3.11.0 install: `node scripts/install.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the node-sass@3.11.0 install script 'node scripts/install.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls node-sass
npm ERR! There is likely additional logging output above.

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

we ran npm install node-sass as root. The directory permissions seem fine:

root@07b46a37acfc:~/.npm/node-sass/3.11.0# ls -la
total 356
drwxr-xr-x 3 root root   4096 Nov  3 14:40 .
drwxr-xr-x 4 root root   4096 Nov  3 14:43 ..
drwxr-xr-x 2 root root   4096 Nov  3 14:40 package
-rw-r--r-- 1 root root 349383 Nov  3 14:40 package.tgz

The OS is Ubuntu 14.04 (running in Docker), fully updated. Node is from https://deb.nodesource.com/node_6.x.

@xzyfer
Copy link
Contributor

xzyfer commented Nov 3, 2016

Thanks for the report. @nschonni this is due to recent caching change. Since npm scripts run a restricted it's not guaranteed that it's going to have access to the npm cache dir (which defaults to the users' home dir).

@xzyfer
Copy link
Contributor

xzyfer commented Nov 3, 2016

getCachePath() needs to be updated to also check for access and fallback to the local vendor directory as a last resort. This issue will be common for CI environments that run as root.

@nschonni
Copy link
Contributor

nschonni commented Nov 3, 2016

It looks like there is also a version conflict going on here.

Node is from https://deb.nodesource.com/node_6.x.

But your output says you're running 0.10

@xzyfer
Copy link
Contributor

xzyfer commented Nov 3, 2016

Yeah it's common to do an install and rebuild in these environments. They're not getting that far because the initial install is failing.

@alexjurkiewicz
Copy link
Author

Good catch @nschonni -- that looks like a rabbit hole I don't want to dive into so will ignore your comment 🙈

@nschonni
Copy link
Contributor

nschonni commented Nov 3, 2016

Not a solution, and we do need a fault tollarant fallback

@xzyfer
Copy link
Contributor

xzyfer commented Nov 3, 2016

I have a patch in progress #1782. The cache directory needs to be determined lazily.

@chosroes
Copy link

chosroes commented Nov 3, 2016

This is completely blocking !

@xzyfer
Copy link
Contributor

xzyfer commented Nov 3, 2016

You can work around this issue by setting your cache path to something writable

npm config set cache "/tmp/.npm"

@chosroes
Copy link

chosroes commented Nov 3, 2016

@xzyfer This is not working for me

@xzyfer
Copy link
Contributor

xzyfer commented Nov 3, 2016

I've released v3.11.1 until we have a workaround for these systems.

@xzyfer xzyfer closed this as completed Nov 3, 2016
jiongle1 pushed a commit to scantist-ossops-m2/node-sass that referenced this issue Apr 7, 2024
Fixup some docs on importers (undefined variables)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants