繁体   English   中英

为什么 npx react-native init MyApp 不起作用并且不创建 React Native 项目?

[英]Why doesn't npx react-native init MyApp not work and doesn't create a React Native project?

我正在尝试npx react-native init <MyApp>启动一个应用程序,但它没有完成构建。 两天前这有效,今天无效。 我已经用谷歌搜索了想法,但我没有看到类似的东西

在构建和下载依赖项一段时间后,一切都停止了,控制台显示以下内容

iOS 和 Android 文件夹不完整,当我尝试运行 iOS 或 ZE84E30B9390CDB64DB6IDB2C9DZ 时出现错误。

搜索我找到了与ignore-engines相关的文章,但我不明白为什么这会突然发生在我身上,当 2 天前一切正常时

这个错误是什么意思,为什么? 谢谢

错误 jest-cli@28.0.2:引擎“节点”与此模块不兼容。 预期版本“^12.13.0 || ^14.15.0 || ^16.10.0 ||

=17.0.0”。得到“16.6.0”错误发现不兼容的模块。信息访问https://yarnpkg.com/en/docs/cli/add以获取有关此命令的文档。/Volumes/MIguelApps/REACT-NATIVE/pruebas /carpeta sin 标题/Senderos/node_modules/metro-hermes-compiler/src/emhermesc.js:77 throw ex; ^

RuntimeError: abort(Error: Command failed: yarn add -D @babel/core @babel/runtime @react-native-community/eslint-config eslint jest babel-jest metro-react-native-babel-preset react-test-renderer @17.0.2)。 使用 -s ASSERTIONS=1 构建以获取更多信息。 在 process.abort (/Volumes/MIguelApps/REACT-NATIVE/pruebas/carpeta sin título/Senderos/node_modules/metro-hermes-compiler/src/emhermesc.js:402:15) 在 process.emit (node:events:394 :28) 在发射 (node:internal/process/promises:136:22) 在 processPromiseRejections (node:internal/process/promises:242:25) 在 processTicksAndRejections (node:internal/process/task_queues:97:32)

///////////////////////

警告模式 ["@babel/core@^7.17.9"] 试图在同一个目的地解压 "/Users/miguelito/Library/Caches/Yarn/v6/npm-@babel-core-7.17.9-6bae81a06d95f4d0dec5bb9d74bbc1f58babdcfe-完整性/node_modules/@babel/core" 作为模式 ["@babel/core@^7.14.0","@babel/core@^7.14.0","@babel/core@^7.14.0","@ babel/core@^7.13.16","@babel/core@^7.14.0","@babel/core@^7.14.0","@babel/core@^7.14.0","@babel/ core@^7.11.6","@babel/core@^7.11.6","@babel/core@^7.12.3","@babel/core@^7.11.6","@babel/core@ ^7.14.0"]。 这可能会导致不确定的行为,即跳过。 警告模式 ["@babel/runtime@^7.17.9"] 试图在同一目的地解压 "/Users/miguelito/Library/Caches/Yarn/v6/npm-@babel-runtime-7.17.9-d19fbf802d01a8cb6cf053a64e472d42c434ba72-完整性/node_modules/@babel/runtime" 作为模式 ["@babel/runtime@^7.8.4"]。 这可能会导致不确定的行为,即跳过。

有同样的问题,升级到最新节点对我有用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM