Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 节点立即被杀死-MacOS_Node.js_Macos_Crash - Fatal编程技术网

Node.js 节点立即被杀死-MacOS

Node.js 节点立即被杀死-MacOS,node.js,macos,crash,Node.js,Macos,Crash,我一直在尝试调试为什么会发生这种情况,以及如何修复它,以便我可以工作! 问题是这样的: ➜ ~ node [1] 2912 killed node 它发生在纱线和npm上,所以我假设它是节点。我在/var/log/system.log中找不到任何节点。 我尝试通过brew重新安装节点,但错误依然存在。我也重新安装了纱线。 我还能做些什么来找出这是为什么?此日志记录到哪里 顺便说一句:我没有耗尽内存,我有可用的ram和硬盘空间 我打开Console utility应用程序,在尝试

我一直在尝试调试为什么会发生这种情况,以及如何修复它,以便我可以工作! 问题是这样的:

➜  ~ node
[1]    2912 killed     node
它发生在纱线和npm上,所以我假设它是节点。我在/var/log/system.log中找不到任何节点。 我尝试通过brew重新安装节点,但错误依然存在。我也重新安装了纱线。 我还能做些什么来找出这是为什么?此日志记录到哪里

顺便说一句:我没有耗尽内存,我有可用的ram和硬盘空间

我打开Console utility应用程序,在尝试启动nodejs时发现此错误:

proc 4298:加载文件节点的代码签名错误2

谢谢

修复

我通过完全移除节点并通过nvm重新安装进行了修复


我通过完全删除节点并通过nvm重新安装修复了此问题。我在新款Macos Big Sur上遇到了完全相同的问题,我通过以下步骤修复了此问题,我希望这将节省一些人的时间:

这就是我得到的

➜  ~ node
[1]    12187 killed     node
在控制台中,我发现错误消息指向icu4c

CODE SIGNING: process 11193[node]: rejecting invalid page at address 0x1047f4000 from offset 0x0 in file "/opt/homebrew/Cellar/icu4c/67.1/lib/libicui18n.67.1.dylib" (cs_mtime:1614412395.998493416 == mtime:1614412395.998493416) (signed:1 validated:1 tainted:1 nx:0 wpmapped:0 dirty:0 depth:0)
所以我卸载了node和icu4c包,如果你有纱线,你可能还想卸载它

➜  ~ brew uninstall node
Uninstalling /opt/homebrew/Cellar/node/15.10.0... (3,390 files, 54.9MB)
➜  ~ brew uninstall icu4c
Uninstalling /opt/homebrew/Cellar/icu4c/67.1... (258 files, 72.4MB)
然后我运行了一个额外的命令,只是为了删除任何不需要的东西。 brew清理

之后,我运行brew安装节点,它开始工作! 这是我终端的日志:

➜ ~ brew安装节点 ==>下载https://homebrew.bintray.com/bottles/icu4c-67.1.arm64_big_sur.bo 已下载:/Users/pgoca/Library/Caches/Homebrew/downloads/0ead47d11680c7b6ed4d76eb2a934878314e34e9ac979b5306b6fb7a1ac3f8ae-icu4c-67.1.arm64_big_sur.battle.tar.gz ==>下载https://homebrew.bintray.com/bottles/node-15.10.0.arm64_big_sur. 已下载:/Users/pgoca/Library/Caches/Homebrew/downloads/5e38af944729bd333a4217bf8327099595ebec3a5e7c5eb1029399555828e39b-node-15.10.0.arm64_big_sur.瓶子.tar.gz ==>安装节点的依赖项:icu4c ==>安装节点依赖项:icu4c ==>浇注icu4c-67.1.arm64_big_sur.瓶子.tar.gz ==>注意事项 icu4c仅为keg,这意味着它没有符号链接到/opt/homebrew, 因为macOS只提供libicucore.dylib,其他什么都没有。 如果需要在路径中首先使用icu4c,请运行: echo'export PATH=/opt/homebrew/opt/icu4c/bin:$PATH'>>~/.zshrc echo'export PATH=/opt/homebrew/opt/icu4c/sbin:$PATH'>>~/.zshrc 要让编译器找到icu4c,您可能需要设置: 导出LDFLAGS=-L/opt/homebrew/opt/icu4c/lib 导出CPPFLAGS=-I/opt/homebrew/opt/icu4c/include ==>摘要
我在new Macos Big Sur上遇到了完全相同的问题,我通过以下步骤解决了这个问题,我希望这能节省一些人的时间:

这就是我得到的

➜  ~ node
[1]    12187 killed     node
在控制台中,我发现错误消息指向icu4c

CODE SIGNING: process 11193[node]: rejecting invalid page at address 0x1047f4000 from offset 0x0 in file "/opt/homebrew/Cellar/icu4c/67.1/lib/libicui18n.67.1.dylib" (cs_mtime:1614412395.998493416 == mtime:1614412395.998493416) (signed:1 validated:1 tainted:1 nx:0 wpmapped:0 dirty:0 depth:0)
所以我卸载了node和icu4c包,如果你有纱线,你可能还想卸载它

➜  ~ brew uninstall node
Uninstalling /opt/homebrew/Cellar/node/15.10.0... (3,390 files, 54.9MB)
➜  ~ brew uninstall icu4c
Uninstalling /opt/homebrew/Cellar/icu4c/67.1... (258 files, 72.4MB)
然后我运行了一个额外的命令,只是为了删除任何不需要的东西。 brew清理

之后,我运行brew安装节点,它开始工作! 这是我终端的日志:

➜ ~ brew安装节点 ==>下载https://homebrew.bintray.com/bottles/icu4c-67.1.arm64_big_sur.bo 已下载:/Users/pgoca/Library/Caches/Homebrew/downloads/0ead47d11680c7b6ed4d76eb2a934878314e34e9ac979b5306b6fb7a1ac3f8ae-icu4c-67.1.arm64_big_sur.battle.tar.gz ==>下载https://homebrew.bintray.com/bottles/node-15.10.0.arm64_big_sur. 已下载:/Users/pgoca/Library/Caches/Homebrew/downloads/5e38af944729bd333a4217bf8327099595ebec3a5e7c5eb1029399555828e39b-node-15.10.0.arm64_big_sur.瓶子.tar.gz ==>安装节点的依赖项:icu4c ==>安装节点依赖项:icu4c ==>浇注icu4c-67.1.arm64_big_sur.瓶子.tar.gz ==>注意事项 icu4c仅为keg,这意味着它没有符号链接到/opt/homebrew, 因为macOS只提供libicucore.dylib,其他什么都没有。 如果需要在路径中首先使用icu4c,请运行: echo'export PATH=/opt/homebrew/opt/icu4c/bin:$PATH'>>~/.zshrc echo'export PATH=/opt/homebrew/opt/icu4c/sbin:$PATH'>>~/.zshrc 要让编译器找到icu4c,您可能需要设置: 导出LDFLAGS=-L/opt/homebrew/opt/icu4c/lib 导出CPPFLAGS=-I/opt/homebrew/opt/icu4c/include ==>摘要
我在M1 Mac Mini上。我的解决方案是重新安装自制软件。步骤:

运行官方卸载脚本:/bin/bash-c$curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh 清理:sudo rm-rf/opt/homebrew 新安装:/bin/bash-c$curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh brew安装节点
我在M1 Mac Mini上。我的解决方案是重新安装自制软件。步骤:

运行官方卸载脚本:/bin/bash-c$curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh 清理:sudo rm-rf/opt/homebrew 新安装:/bin/bash-c$curl-fsSLhttps://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh brew安装节点