当前位置: 首页 > 知识库问答 >
问题:

React native npm安装致命错误:“CoreServices/CoreServices。找不到h'文件

相弘和
2023-03-14

当我在react原生项目上运行“npm安装”时,如果我不使用sudo运行,就会出现错误。注意,当我运行Facebook初学者项目“react native init AwesomeProject”时,我也遇到了同样的问题。

这个问题是新问题,到目前为止我已经尝试过:

- re-installing xcode v7.3.1 (7D1014)
- re-installing node-v6.2.0 (npm v3.8.9)
- downgrading to node-v6.1.0 (npm v3.8.6)
- removing node version manager (nvm)

净效果是npm不会安装fsevents@1.0.12。

├─┬ react-native@0.24.0 
│ ├─┬ fbjs-scripts@0.4.0 
│ │ ├─┬ babel@5.8.38 
│ │ │ ├─┬ chokidar@1.5.1 
│ │ │ │ ├─┬ fsevents@1.0.12 

Sudo:

npm警告已弃用MD5@1.2.2:已弃用,请使用小写'md5@2.x“从现在开始npm警告不推荐的交叉繁殖-async@2.2.4:交叉繁殖不再需要构建工具链,而是使用它!npm警告不推荐使用的lodash-node@2.4.1:为了支持lodash@^4.0.0,此套餐已停止。npm警告生命周期typechecker@2.0.8~preinstall:无法在wd%s%s中运行(wd=%s)typechecker@2.0.8节点/循环的js/Users/andreahylton/idpractice/node_modules/。暂存/类型检查器-7c919859 npm警告首选全局cover@0.2.9应与-g npm一起安装babel@5.8.38应该安装-g

fsevents@1.0.12install/Users/andreahylton/idpractice/node_modules/fsevents node pre-gyp install——返回构建

SOLINK_模块(目标)发布/。节点CXX(目标)发布/obj。目标/fse/fsevents。o SOLINK_模块(目标)发布/fse。node COPY/Users/andreahylton/idpractice/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse。节点触摸释放/obj。构建后的目标/行动。邮票

bufferutil@1.2.1安装/Users/andreahylton/idpractice/node_modules/bufferutil node gyp rebuild

CXX(目标)发布/obj。target/bufferutil/src/bufferutil。o
SOLINK_模块(目标)释放/bufferutil。节点

utf-8-validate@1.2.1安装 /Users/andreahylton/idpractice/node_modules/utf-8-validatenode-gyp重建

CXX(目标)发布/obj.target/validation/src/validation.o
SOLINK_MODULE(目标)发布/validation.node

产卵-sync@1.0.15postinstall/Users/andreahylton/idpractice/node_模块/spawn sync node postinstall

没有Sudo:

npm WARN已弃用MD5@1.2.2:已弃用,从现在开始使用小写'md5@2.x'npm WARN已弃用cross-spawn-async@2.2.4:交叉生成不再需要构建工具链,请改用它!npm WARN已弃用lodash-node@2.4.1:此软件包已停止使用,转而支持lodash@^4.0.0。

typechecker@2.0.8预安装/Users/andreahylton/idpractice/node_modules/。暂存/类型检查器-7c919859节点/循环的js

npm警告全球cover@0.2.9应与-g npm一起安装babel@5.8.38应该安装-g

fsevents@1.0.12install/Users/andreahylton/idpractice/node_modules/fsevents node pre-gyp install——返回构建

2016-05-24 10:36:25.735 xcodebuild[37842:5261935]命令行中的生成设置:2016-05-24 10:36:25.736 xcodebuild[37842:5261935]
toolschains=com。苹果dt。工具链。xcodefault2016-05-24 10:36:25.736 xcodebuild[37842:5261935]
XCODE_DEFAULT_TOOLCHAIN_OVERRIDE=/Applications/XCODE。app/Contents/Developer/toolschains/xcodefault。xToolchain SOLINK_模块(目标)发布/。节点ld:警告:紧急:针对OSX构建,但针对iOS构建的动态库(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/lib/libSystem.dylib)进行链接。注意:这将是未来的错误。ld:警告:紧急:针对OSX构建,但针对iOS构建的动态库(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/lib/libstdc.dylib)进行链接。注意:这将是未来的错误
CXX(目标)发布/obj。目标/fse/fsevents。哦/fsevents。抄送:11:10:致命错误:“CoreServices/CoreServices。找不到h'文件

     ^ 1 error generated. make: *** [Release/obj.target/fse/fsevents.o] Error 1 gyp ERR! build error  gyp

犯错误堆栈错误:make失败,退出代码:2 gyp ERR!在子进程中堆叠
。onExit(/usr/local/lib/node_modules/npm/node_modules/node gyp/lib/build.js:276:23)gyp ERR!堆叠在emitTwo(events.js:106:13)gyp ERR!在这个过程中叠加。发射(events.js:191:7)gyp ERR!在过程中堆叠。孩子的过程_手柄onexit(internal/child_process.js:204:12)gyp ERR!达尔文系统15.5.0 gyp错误!命令“/usr/local/bin/node”“/usr/local/lib/node_modules/npm/node_modules/node gyp/bin/node gyp.js”“build”“--fallback to build”“--module=/Users/andreahylton/idpractice/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse.node”“--modules_name=fse”“--modules/andreahylton/idpractice/node/node-v48-v48-x64”gyp!cwd/Users/andreahylton/idpractice/node_模块/fsevents gyp ERR!node-v6。1.0 gyp ERR!节点gyp-v3。3.1 gyp ERR!不正常节点前gyp错误!生成错误节点前gyp错误!堆栈错误:未能执行“/usr/local/bin/node/usr/local/lib/node_modules/npm/node_modules/node gyp/bin/node gyp”。js build--回退到build--模块=/Users/andreahylton/idpractice/node\u modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse。node--module_name=fse--module_path=/Users/andreahylton/idpractice/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64'(1)node pre-gyp ERR!在这个过程中叠加。(/Users/andreahylton/idpractice/node_modules/fsevents/node_modules/node pre-gyp/lib/util/compile.js:83:29)node pre-gyp ERR!在emitTwo(events.js:106:13)节点上叠加gyp错误之前!在这个过程中叠加。emit(events.js:191:7)node pre-gyp ERR!maybeClose(internal/child_process.js:850:16)节点gyp错误前的堆栈!在过程中堆叠。孩子的过程_手柄onexit(internal/child_process.js:215:5)节点预gyp ERR!5.0节点前系统Gyrr Darwin!命令“/usr/local/bin/node”“/Users/andreahylton/idpractice/node_modules/fsevents/node_modules/.bin/node pre-gyp”“install”“--回退以生成“node pre-gyp ERR!”!cwd/Users/andreahylton/idpractice/node_modules/fsevents node pre gyp ERR!node-v6。1.0节点前gyp错误!gyp前节点-v v0。6.25节点预gyp错误!not ok无法执行“/usr/local/bin/node/usr/local/lib/node_modules/npm/node_modules/node gyp/bin/node gyp”。js build——构建的回退——module=/Users/andreahylton/idpractice/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64/fse。node--module_name=fse--module_path=/Users/andreahylton/idpractice/node_modules/fsevents/lib/binding/Release/node-v48-darwin-x64'(1)npm警告安装:fsevents@1.0.12 fsevents@1.0.12安装:node-pre-gyp-install——回退到构建npm-WARN-install:fsevents@1.0.12退出状态1

bufferutil@1.2.1安装/Users/andreahylton/idpractice/node_modules/bufferutil node gyp rebuild

2016-05-24 10:36:38.662 xcodebuild[37889:5262508]命令行中的生成设置:2016-05-24 10:36:38.663 xcodebuild[37889:5262508]
toolschains=com。苹果dt。工具链。xcodefault2016-05-24 10:36:38.663 xcodebuild[37889:5262508]
XCODE\u DEFAULT\u TOOLCHAIN\u OVERRIDE=/Applications/XCODE。app/Contents/Developer/toolschains/xcodefault。XC工具链CXX(目标)发布/obj。target/bufferutil/src/bufferutil。o
SOLINK_模块(目标)释放/bufferutil。节点ld:警告:紧急:针对OSX构建,但针对iOS构建的动态库(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/lib/libstdc.dylib)进行链接。注意:这将是未来的错误。ld:警告:紧急:针对OSX构建,但针对iOS构建的动态库(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/lib/libSystem.dylib)进行链接。注意:这将是未来的错误。

utf-8-validate@1.2.1安装 /Users/andreahylton/idpractice/node_modules/utf-8-validatenode-gyp重建

2016-05-24 10:36:42.522 xcodebuild[37965:5262650]命令行中的生成设置:2016-05-24 10:36:42.523 xcodebuild[37965:5262650]
toolschains=com。苹果dt。工具链。xcodefault2016-05-24 10:36:42.523 xcodebuild[37965:5262650]
XCODE\u DEFAULT\u TOOLCHAIN\u OVERRIDE=/Applications/XCODE。app/Contents/Developer/toolschains/xcodefault。XC工具链CXX(目标)发布/obj。target/validation/src/validation。o SOLINK_模块(目标)发布/验证。节点ld:警告:紧急:针对OSX构建,但针对iOS构建的动态库(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/lib/libstdc.dylib)进行链接。注意:这将是未来的错误。ld:警告:紧急:针对OSX构建,但针对iOS构建的动态库(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk/usr/lib/libSystem.dylib)进行链接。注意:这将是未来的错误。

产卵-sync@1.0.15postinstall/Users/andreahylton/idpractice/node_模块/spawn sync node postinstall

共有1个答案

贺玉石
2023-03-14

我通过删除我的~/修复了这个问题。节点gyp和~/。npmrc,然后重启我的mac,看看这个线程https://github.com/nodejs/node-gyp/issues/809

 类似资料:
  • 我在iOS中运行flutter应用程序时出错。 Xcode版本:13 模拟器 : iPhone 13 (版本 15.0) 错误: 我试过了: 删除 Podfile.lock 什么都没用

  • 我正在从这些来源编译一个谷歌协议插件。 我已经安装了protobuf@2.5使用自制命令: brew安装protobuf@2.5 安装后,当我试图通过调用进行编译时,出现以下错误: 特别是,这一行很有趣: 致命错误:未找到'google/progbuf/compiler/plugin. h'文件 而我肯定能找到这条路径并找到文件: /usr/本地/酒窖/protobuf@2.5/2.5.0/inc

  • Xcode的输出:在文件中包含从 /Users/dani/development/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-6.0.3/ios/Classes/FLTURLLauncherPlugin.m: 7: /Users/dani/development/flutter/.pub-cache/hosted/pub.dart

  • 因此我正在尝试使用emScripten编译以下代码: 我的实际代码要大得多,但我在这里缩短了它,以强调我的主要疑虑(我留下了我正在使用的所有头文件)。这段代码使用g++进行了完美的编译,并给出了所有预期的输出。 但当我使用将其编译为web程序集时,它给出了以下错误: 为什么EMCC没有找到这个文件?在C++中是否有处理unordered_maps的替代方法? 我在使用tr1时遇到了堆栈溢出问题中的

  • 我尝试一个简单的Web服务示例,我得到这个错误,即使我取消注释在文件: 致命错误:在C:\Program Files(x86)\EasyPHP-5.3.9\第2行的www\server.php中找不到类'SoapClient'

  • 问题内容: 我有一个问题,我在Linux服务器上安装了“ Archive_Zip 0.1.1”,但是当我尝试运行脚本来创建zip文件时,却出现了致命错误 致命错误:在…中找不到类 我把代码放在哪里 但找不到类文件。 请告诉我解决方案。我该怎么办才能解决问题?我也将文件放到脚本所在的文件夹中,但是不起作用。 问题答案: 对于要显示的类,PHP需要安装zip扩展名。 有关安装说明,请参见此页面(Lin