-
Notifications
You must be signed in to change notification settings - Fork 3k
uid must be an unsigned int #13918
Comments
can you upload that file somewhere? |
yes, here you can download the npm-debug.log best regards, Rainer Am 10.09.16 um 16:50 schrieb Anna Henningsen:
|
Weird. Does that occur when installing any of these modules manually?
Can you edit npm’s files yourself, e.g. by applying this patch in diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js
index 2798050604be..c517ce4eebfc 100644
--- a/node_modules/graceful-fs/polyfills.js
+++ b/node_modules/graceful-fs/polyfills.js
@@ -229,6 +229,8 @@ function chownFix (orig) {
if (!orig) return orig
return function (target, uid, gid, cb) {
return orig.call(fs, target, uid, gid, function (er) {
+ if (er && er.message.match(/uid must be an unsigned int/))
+ console.trace(target, uid, gid);
if (chownErOk(er)) er = null
if (cb) cb.apply(this, arguments)
}) (If you want, I’d be open to a remote debugging session over IRC, I’m |
i just got the same issue when installing electron npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! Please include the following file with any support request: |
Hm, @puresamari, same questions for you? Any chance you’d want to hop onto IRC and try to work this out? |
I am also getting the same error when trying to install yeoman. I have the latest version of npm. Anyone find a solution yet? |
Has anyone been able to resolve this problem? I am also getting the "uid must be an unsigned int" error when I try to install typescript or generator-hottowel. It could be that any package would give me this problem at the moment, but these are the two that I have been trying to install. I have been experiencing this problem for the past two days. My installation is on OSX 10.11.6 with node v6.4.0 and npm 3.10.8. |
I have this problem on OSX 10.10.5 with node v6.4.0 and npm 3.10.8
The log file is attached [edit] |
Hello and sorry for the response time. Am 10.09.16 um 20:01 schrieb Anna Henningsen:
I'm trying to install cordova ... it depends on ios-sim and ios-deploy ... Thanks, I have done the patch. best regards, Rainer
|
Sorry, the patch’s output should appear on the console, not in the debug log (I don’t how well it is possible to generate a stack trace in a module that’s a dependency of npm and send that through npm’s logger… it should work but I didn’t want to dare trying something like that from remote).
Something like |
hi addaleax, for me its only happening when installing globally. 🎯 |
okay, it would probably still be kind of good if somebody were up for a debugging session, but just to make sure – does this happen for anybody with npm@3.10.7? If it’s a regression, I’m pretty sure the npm team would like to know about it. |
i have npm@3.10.8 |
hey everyone, i just found a possible fix at least it worked for me. can you check if that also works for you? |
@puresamari |
@puresamari Thank you! The first option also worked for my situation. |
Hello, I had still done the checking permission option before. Now I tried installing without -g:wurm:~ ragu$ npm init --yes { wurm:~ ragu$ sudo npm install ios-sim npm WARN ragu@1.0.0 No description It seems ok With -g:wurm:~ ragu$ sudo npm install -g ios-sim npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! uid must be an unsigned int npm ERR! Please include the following file with any support request: npm ERR! /Users/ragu/npm-debug.logand at last my permissions: Ok, if you want a remote hacking session on my macbook. I can configure best regards, Rainer Am 12.09.16 um 21:19 schrieb Anna Henningsen:
+++ Rainer Gümpelein +++ www.GNU-Systems.de +++ www.COPRI.eu +++ |
That might be cool, but it also might not be necessary, I can reproduce the failure in Travis CI and can probably go from there |
So, turns out this is a bug in Node.js core where the UID for This only occurs with npm@3.10.8; in that release, |
`FChown` and `Chown` test that the `uid` and `gid` parameters they receive are unsigned integers, but `Stat()` and `FStat()` would return the corresponding fields of `uv_stat_t` as signed integers. Applications which pass those these values directly to `Chown` may fail (e.g. for `nobody` on OS X, who has an `uid` of `-2`, see e.g. nodejs/node-v0.x-archive#5890). This patch changes the `Integer::New()` call for `uid` and `gid` to `Integer::NewFromUnsigned()`. All other fields are kept as they are, for performance, but strictly speaking the respective sizes of those fields aren’t specified, either. Ref: npm/npm#13918
@javaminister Thanks for all the debugging information! I’m not sure there’s anything better you can do right now other than what @puresamari suggested in #13918 (comment), so maybe you could add a link to that in your first comment here? That might be helpful for anyone else who comes by this thread. |
@addaleax For future reference, for one-off instrumentation going to the debug log I'd do it like this: diff --git a/node_modules/graceful-fs/polyfills.js b/node_modules/graceful-fs/polyfills.js
index 2798050604be..c517ce4eebfc 100644
--- a/node_modules/graceful-fs/polyfills.js
+++ b/node_modules/graceful-fs/polyfills.js
@@ -229,6 +229,8 @@ function chownFix (orig) {
if (!orig) return orig
return function (target, uid, gid, cb) {
return orig.call(fs, target, uid, gid, function (er) {
+ if (er && er.message.match(/uid must be an unsigned int/))
+ require('npmlog').warn('!!!', target, uid, gid, new Error().stack)
if (chownErOk(er)) er = null
if (cb) cb.apply(this, arguments)
}) |
@iarna thanks, that makes sense! (and I should have had that idea… but it turns out the patch wouldn’t have worked anyway. 😄) |
¯_(ツ)_/¯ =) |
for right now my solution is to reinstall the node.js (4.5.0) for @addaleax, thanks a lot for your work! Am 13.09.16 um 14:17 schrieb Anna Henningsen:
|
I am still not able to run Gulp. It always give me error
I have updated minimatch file and now version it shows: |
@prashmi9 Those are warnings, and you can ignore them (or generally anything that starts with If there’s something that doesn’t work, it would probably be helpful if you can be a bit more specific about what exactly doesn’t work? |
Can confirm this link worked beautifully : https://rockwithazure.wordpress.com/2016/09/24/sp-framework-macos-sierra-troubles-and-resolution/ I used the Github zip file method (found here: https://github.com/tj/n). Following that Github tutorial, I ran the following commands (4 separate steps) : sudo npm cache clean -f no more UID errors (Mac OS Sierra). npm -v No idea how this worked but it did. phew |
`FChown` and `Chown` test that the `uid` and `gid` parameters they receive are unsigned integers, but `Stat()` and `FStat()` would return the corresponding fields of `uv_stat_t` as signed integers. Applications which pass those these values directly to `Chown` may fail (e.g. for `nobody` on OS X, who has an `uid` of `-2`, see e.g. nodejs/node-v0.x-archive#5890). This patch changes the `Integer::New()` call for `uid` and `gid` to `Integer::NewFromUnsigned()`. All other fields are kept as they are, for performance, but strictly speaking the respective sizes of those fields aren’t specified, either. Ref: npm/npm#13918 PR-URL: #8515 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> undo accidental change to other fields of uv_fs_stat
bogon:~ zql$ sudo npm install -g n npm ERR! uid must be an unsigned int npm ERR! Please include the following file with any support request: |
I was having this issue when trying to install a package that I generated with Yeoman-generator, after installed node version 6.7.0 my issue was fixed. Thanks |
@bjcangyue Upgrade your node to 6.9.0 and it should work. |
just wanted to clarify that the solution @puresamari provided works because it allows packages to be installed globally without using |
*downgrade to 6.9.0 |
I fixed this by reinstalling node and npm. |
Upgrading to node v6.9.1 has fixed this for me :) |
`FChown` and `Chown` test that the `uid` and `gid` parameters they receive are unsigned integers, but `Stat()` and `FStat()` would return the corresponding fields of `uv_stat_t` as signed integers. Applications which pass those these values directly to `Chown` may fail (e.g. for `nobody` on OS X, who has an `uid` of `-2`, see e.g. nodejs/node-v0.x-archive#5890). This patch changes the `Integer::New()` call for `uid` and `gid` to `Integer::NewFromUnsigned()`. All other fields are kept as they are, for performance, but strictly speaking the respective sizes of those fields aren’t specified, either. Ref: npm/npm#13918 PR-URL: #8515 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> undo accidental change to other fields of uv_fs_stat
`FChown` and `Chown` test that the `uid` and `gid` parameters they receive are unsigned integers, but `Stat()` and `FStat()` would return the corresponding fields of `uv_stat_t` as signed integers. Applications which pass those these values directly to `Chown` may fail (e.g. for `nobody` on OS X, who has an `uid` of `-2`, see e.g. nodejs/node-v0.x-archive#5890). This patch changes the `Integer::New()` call for `uid` and `gid` to `Integer::NewFromUnsigned()`. All other fields are kept as they are, for performance, but strictly speaking the respective sizes of those fields aren’t specified, either. Ref: npm/npm#13918 PR-URL: #8515 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> undo accidental change to other fields of uv_fs_stat
I tried every other solution on here but upgrading to the latest version (6.9.1) also worked for me. On macOS 10.12.1. |
Exactly, just in case one more opinion: with the version 6.9.1 is working fine. |
sudo npm install -g ios-sim
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "ios-sim"
npm ERR! node v4.5.0
npm ERR! npm v3.10.8
npm ERR! uid must be an unsigned int
the whole npm-debug.log is attached
The text was updated successfully, but these errors were encountered: