【问题标题】:Install remotebuild on Mac failed with „uid must be an unsigned int“在 Mac 上安装 remotebuild 失败,“uid must be an unsigned int”
【发布时间】:2017-02-16 02:21:31
【问题描述】:

我尝试在我的 Mac 上安装 remotebuild,以便通过我的 Mac 在 Visual Studio 2015 中部署 Cordova 应用程序。

技术资料: macOS 塞拉利昂 节点 v4.6.0 npm v3.10.8 代码 8

但它失败并出现以下错误:“uid must be an unsigned int”

我尝试重新安装 npm 没有成功。

$ sudo npm install -g remotebuild

npm WARN deprecated wrench@1.5.9: wrench.js is deprecated! You should check out fs-extra (https://github.com/jprichardson/node-fs-extra) for any operations you were using wrench for. Thanks for all the usage over the years.
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "remotebuild"
npm ERR! node v4.6.0
npm ERR! npm  v3.10.8

npm ERR! uid must be an unsigned int
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>
npm ERR! Darwin 16.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "remotebuild"
npm ERR! node v4.6.0
npm ERR! npm  v3.10.8
....
npm ERR! uid must be an unsigned int
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

【问题讨论】:

    标签: node.js macos cordova visual-studio-2015 npm


    【解决方案1】:

    但它失败并出现以下错误:“uid must be an unsigned int”

    这是一个已知问题,根本原因在于 Node.js 核心,其中 OS X 上的 nobodyUID-2 转换为无符号整数)将作为有符号整数返回fs.stat()。请参阅 Github here 中的讨论。这个问题只存在于npm v3.10.8

    并且修复已更新。请看fs: fix handling of struct stat fields #8515

    【讨论】:

      【解决方案2】:

      这将通过将节点模块的权限重置为您的 ID 来解决此问题:

      sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
      

      为了记录,使用 nom 安装许多不同的问题都会发生这种情况,例如安装 Cordova:

      npm install -g cordova
      

      【讨论】:

        猜你喜欢
        • 2013-07-25
        • 1970-01-01
        • 1970-01-01
        • 2023-03-20
        • 2020-09-16
        • 2014-09-24
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多