Created
April 7, 2016 01:22
-
-
Save mattpodwysocki/4e6951fc93adae064a73ed0b2251d180 to your computer and use it in GitHub Desktop.
Installing global packages causes an error using NPM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing Node/NPM | |
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - | |
sudo apt-get install -y nodejs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing a package globally | |
root@localhost:/# npm install -g gulp | |
Error: could not get uid/gid | |
net.js:135 | |
this._handle.open(options.fd); | |
^ | |
Error: EINVAL: invalid argument, uv_pipe_open | |
at Error (native) | |
at new Socket (net.js:135:18) | |
at createWritableStdioStream (internal/process/stdio.js:142:16) | |
at process.stdout (internal/process/stdio.js:10:14) | |
at console.js:99:37 | |
at NativeModule.compile (node.js:395:5) | |
at Function.NativeModule.require (node.js:340:18) | |
at node.js:223:27 | |
at Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/uid-number/get-uid-gid.js:16:1) | |
at Module._compile (module.js:413:34) | |
at /usr/lib/node_modules/npm/node_modules/uid-number/uid-number.js:37:16 | |
at ChildProcess.exithandler (child_process.js:209:5) | |
at emitTwo (events.js:100:13) | |
at ChildProcess.emit (events.js:185:7) | |
at maybeClose (internal/child_process.js:850:16) | |
at Socket.<anonymous> (internal/child_process.js:323:11) | |
at emitOne (events.js:90:13) | |
at Socket.emit (events.js:182:7) | |
at Pipe._onclose (net.js:475:12) |
This is the only thing that worked for me. I had to basically stop everything that is using the node-modules folder.
- turned off VSC
- stopped local server
After that the install worked.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I got the error too while installing react-router-dom but after restarting vs-code react-router-dom installed succesfully