React Native Init在Cocoapods安装上失败

发布于 2025-01-17 16:48:08 字数 1151 浏览 3 评论 0 原文

我面临一个相当奇怪的错误。如果我通过我的终端 reation-nitive init ,可可录得很好。 如果我通过VSCODE的集成终端启动一个新项目,则在POD安装期间会出现此错误:

    For help, see: https:/nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

[!] Invalid `Podfile` file: 859: unexpected token at ''.

 #  from /Users/XXXXX/Documents/test/ios/Podfile:7
 #  -------------------------------------------
 #  target 'test' do
 >    config = use_native_modules!
 #  
 #  -------------------------------------------

我已经验证了我的lang变量在两个终端上都是相同的: en_us.utf-8

ruby​​版本: Ruby 3.1.1p18(2022-02-18修订版53F5FC4236)[ARM64-DARWIN21]

Cocoapods版本: 1.11.3

我尝试通过BRER,RBENV,RBENV,RVM,RBENV,RVM。这三个问题仍然存在。 我在M1上的Macos Monterey 12.1。

I am facing a rather strange bug. If I react-native init through my terminal, cocoapods installs fine.
If I init a new project through vscode's integrated terminal, I get this error during pod install:

    For help, see: https:/nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

[!] Invalid `Podfile` file: 859: unexpected token at ''.

 #  from /Users/XXXXX/Documents/test/ios/Podfile:7
 #  -------------------------------------------
 #  target 'test' do
 >    config = use_native_modules!
 #  
 #  -------------------------------------------

I have verified that my LANG variable is the same on both terminals: en_US.UTF-8

Ruby version: ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [arm64-darwin21]

Cocoapods version: 1.11.3

I have tried installing ruby through brew, rbenv, rvm. The problem remains on all three.
I am on MacOS Monterey 12.1 on M1.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文