Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#46467 - [npm] unable to install any packages

Attached to Project: Community Packages
Opened by Matt Price (matt.price) - Monday, 28 September 2015, 23:48 GMT
Last edited by Felix Yan (felixonmars) - Thursday, 17 December 2015, 09:50 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Felix Yan (felixonmars)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

I'm unable to install any npm packages with the current versions of npm and nodejs in community. All end with error messages (reproduced below).

Additional info:
* package version(s)
local/nodejs 4.1.1-1
local/npm 3.3.4-1

* config and/or log files etc.

see attached


Steps to reproduce:

1) sudo pacman -S npm nodejs
2) sudo npm install -g particle-cli

-------------------
output:

src sudo npm install -g serialport
/usr/bin/serialportlist -> /usr/lib/node_modules/serialport/bin/serialportList.js
/usr/bin/serialportterm -> /usr/lib/node_modules/serialport/bin/serialportTerminal.js

> serialport@1.7.4 install /usr/lib/node_modules/serialport
> node-pre-gyp install --fallback-to-build

gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/4.1.1"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/lib/node_modules/serialport/.node-gyp"
make: Entering directory '/usr/lib/node_modules/serialport/build'
make: *** No rule to make target '../.node-gyp/4.1.1/include/node/common.gypi', needed by 'Makefile'. Stop.
make: Leaving directory '/usr/lib/node_modules/serialport/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:270:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.2.0-4-ARCH
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/lib/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-x64/serialport.node" "--module_name=serialport" "--module_path=/usr/lib/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-x64"
gyp ERR! cwd /usr/lib/node_modules/serialport
gyp ERR! node -v v4.1.1
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/lib/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-x64/serialport.node --module_name=serialport --module_path=/usr/lib/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/lib/node_modules/serialport/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:817:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Linux 4.2.0-4-ARCH
node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/serialport/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/lib/node_modules/serialport
node-pre-gyp ERR! node -v v4.1.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.7
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/lib/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-x64/serialport.node --module_name=serialport --module_path=/usr/lib/node_modules/serialport/build/serialport/v1.7.4/Release/node-v46-linux-x64' (1)
npm ERR! Linux 4.2.0-4-ARCH
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "serialport"
npm ERR! node v4.1.1
npm ERR! npm v3.3.4
npm ERR! code ELIFECYCLE

npm ERR! serialport@1.7.4 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the serialport@1.7.4 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the serialport package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get their info via:
npm ERR! npm owner ls serialport
npm ERR! There is likely additional logging output above.

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

---------------

Seems to happen with every package I try to install; I have also tried using the --python=python2 switch to fix the issue, but hasn't helped me.

Thanks for hte help.
This task depends upon

Closed by  Felix Yan (felixonmars)
Thursday, 17 December 2015, 09:50 GMT
Reason for closing:  Not a bug
Comment by Matt Price (matt.price) - Tuesday, 29 September 2015, 18:21 GMT
I've replaced nodejs with nodejs-0.12 from AUR, and the problem appears to be solved for now. Not marking as closed in case this is a common issue that can be worked around in a better way.
Comment by Felix Yan (felixonmars) - Wednesday, 30 September 2015, 02:03 GMT
You need to specify --unsafe-perm
https://docs.npmjs.com/misc/config#unsafe-perm

Also serialport doesn't support nodejs 4.x
https://github.com/voodootikigod/node-serialport/issues/578

Loading...