[ 'nobody' , 0 ] at / usr / local / lib / node_modules / npm / node_modules / uid - number / uid - number . js : 37 : 16 at ChildProcess . exithandler ( child_process . js : 296 : 5 ) at ChildProcess . emit ( events . js : 182 : 13 ) at maybeClose ( internal / child_process . js : 962 : 16 ) at Process . ChildProcess . _handle . onexit ( internal / child_process . js : 251 : 5 ) TypeError : Cannot read property 'get' of undefined at errorHandler ( / usr / local / lib / node_modules / npm / lib / utils / error - handler . js : 205 : 18 ) at / usr / local / lib / node_modules / npm / bin / npm - cli . js : 78 : 20 at cb ( / usr / local / lib / node_modules / npm / lib / npm . js : 228 : 22 ) at / usr / local / lib / node_modules / npm / lib / npm . js : 266 : 24 at / usr / local / lib / node_modules / npm / lib / config / core . js : 83 : 7 at Array . forEach ( < anonymous > ) at / usr / local / lib / node_modules / npm / lib / config / core . js : 82 : 13 at f ( / usr / local / lib / node_modules / npm / node_modules / once / once . js : 25 : 25 ) at afterExtras ( / usr / local / lib / node_modules / npm / lib / config / core . js : 173 : 20 ) at Conf . < anonymous > ( / usr / local / lib / node_modules / npm / lib / config / core . js : 231 : 22 ) / usr / local / lib / node_modules / npm / lib / utils / error - handler . js : 205 if ( npm . config . get ( 'json' ) ) { TypeError : Cannot read property 'get' of undefined at process . errorHandler ( / usr / local / lib / node_modules / npm / lib / utils / error - handler . js : 205 : 18 ) at process . emit ( events . js : 182 : 13 ) at process . _fatalException ( internal / bootstrap / node . js : 485 : 27 )

解决办法:

npm install 之前添加如下命令:
npm config set unsafe-perm true

参考文章:
https://github.com/tootsuite/mastodon/issues/802

背景执行 npm install @alicloud/fun -g, 报错如下:Error: could not get uid/gid[ 'nobody', 0 ] at /usr/local/lib/node_modules/npm/node_modules/uid-number/uid-number.js:37:16 at ChildProcess.exithandl... 在不管 安装 是哪一个版本的 node .js,都一定会报下面的错,卸载了 node .js,删除环境变量,重启电脑还是不行。 Error : EPERM: operation not permitted, mkdir 'C:\Program Files\ node js\ node _global' TypeError : Cannot read property 'get' of undefined [ 'nobody', 0 ] at /usr/local/lib/ node _ module s/ npm / node _ module s/ uid -number/ uid -number.js:37:16 at ChildProcess.exithandler (chil... Same, building Mastodon in Docker, I used the npm config set unsafe-perm true line in the Dockerfile and was able to make it past the issue. http://githu
1、 npm .config.loaded ? npm .config.get(’_exit’) : true Error : EINVAL: invalid argument, mkdir 'G:\blog_github\“F:\SP\ node \ node _global”;' TypeError : Cannot read property 'loaded' of undefined at exit (E:\博客\ node \ node _ module s\ npm \lib\utils\ error -handler.js
缩进错误(Indentation Error ) 在Python中,所有代码都是通过正确的空格排列的。所以,无论是多出来空格,还是缺少空格,整个代码都不会运行,并且仅返回一个错误函数。 Python代码遵循PEP8空白规范,每一级缩进使用4个空格。 Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory hongdounuoyan: 方案二 加哪里? /etc/profile,还是 jenkins web页面 环境变量 export报错SyntaxError: Unexpected token export 别枳:-): 谢谢 推荐 json-server 的使用(入门篇) 喜欢打篮球的普通人: 进阶篇抓紧呀 关于npm audit fix qq_43517972: npm audit fix --force之后项目跑不动了,有什么办法把更新的版本回退吗 Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 时间格式化参数 【mongoose链接mongodb】current URL string parser is deprecated, and will be removed in a future version