由于某种原因,我无法在我的项目上进行NPM安装,因为我收到以下消息:
SOLINK_MODULE(target) Release/.node
clang: warning: using sysroot for 'iPhoneSimulator' but targeting 'MacOSX' [-Wincompatible-sysroot]
ld: warning: building for macOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/lib/libc++.tbd) built for iOS Simulator
ld: warning: building for macOS, but linking in .tbd file (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.5.sdk/usr/lib/libSystem.tbd) built for iOS Simulator
ld: warning: building for macOS, but linking in .tbd file (/usr/lib/system/libcache.dylib) built for iOS Simulator
ld: warning: building for macOS, but linking in .tbd file (/usr/lib/system/libcommonCrypto.dylib) built for iOS Simulator
ld: warning: building for macOS, but linking in .tbd file (/usr/lib/system/libcompiler_rt.dylib) built for iOS Simulator
ld: warning: building for macOS, but linking in .tbd file (/usr/lib/system/libcopyfile.dylib) built for iOS Simulator
ld: warning: bui
如何解决这个问题????我已经尝试卸载节点并重新安装节点,但我仍然得到相同的错误。
2条答案
按热度按时间wkyowqbh1#
事实上,我不知道问题是从哪里来的,但在注销和重新启动之后,一切都回到了正轨。
jw5wzhpr2#
在花了几个小时调试这个特定的错误(尽管是在不同的上下文中)后,我发现我已经将
SDKROOT
环境变量指向了iOS SDK,这导致Clang将其用作sysroot。取消设置SDKROOT
为我解决了这个问题。旁注:这也解释了为什么注销和重新启动工作-作为一种方式,清除所有临时设置的环境变量。