问答

react-native init 报错,求解

作者:admin 2021-09-13 我要评论

`error D:React_Testnode_modulescore-js: Command failed. Exit code: 1 Command: node -e "try{require('./postinstall')}catch(e){}" Arguments: Directory: ...

在说正事之前,我要推荐一个福利:你还在原价购买阿里云、腾讯云、华为云服务器吗?那太亏啦!来这里,新购、升级、续费都打折,能够为您省60%的钱呢!2核4G企业级云服务器低至69元/年,点击进去看看吧>>>)

`error D:React_Testnode_modulescore-js: Command failed.
Exit code: 1
Command: node -e "try{require('./postinstall')}catch(e){}"
Arguments:
Directory: D:React_Testnode_modulescore-js
Output:
????????????·????
info Visit https://yarnpkg.com/en/docs/c... for documentation about this command.
Error: Command failed: yarn add react-native --exact

at checkExecSyncError (child_process.js:621:11)
at execSync (child_process.js:657:15)
at run (C:\Users\Admin\AppData\Roaming\npm\node_modules\react-native-cli\index.js:294:5)
at createProject (C:\Users\Admin\AppData\Roaming\npm\node_modules\react-native-cli\index.js:249:3)
at init (C:\Users\Admin\AppData\Roaming\npm\node_modules\react-native-cli\index.js:200:5)
at Object.<anonymous> (C:\Users\Admin\AppData\Roaming\npm\node_modules\react-native-cli\index.js:153:7)
at Module._compile (internal/modules/cjs/loader.js:956:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10)
at Module.load (internal/modules/cjs/loader.js:812:32)
at Function.Module._load (internal/modules/cjs/loader.js:724:14) {

status: 1,
signal: null,
output: [ null, null, null ],
pid: 6564,
stdout: null,
stderr: null
}
Command yarn add react-native --exact failed.`

请问有大佬知道这个报错的原因么?试了很多次都不成功,以及设置过了镜像源
`
yarn config set registry https://registry.npm.taobao.org --global
yarn config set disturl https://npm.taobao.org/dist --global
`

###

请问 有解决掉吗?我遇到了和你一样的问题,完全没有头绪

版权声明:本文转载自网络,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本站转载出于传播更多优秀技术知识之目的,如有侵权请联系QQ/微信:153890879删除

相关文章
  • react-native init 报错,求解

    react-native init 报错,求解

  • 请问怎么做MySQL的数据优化

    请问怎么做MySQL的数据优化

  • antd upload 图片设置原图保护,无法查

    antd upload 图片设置原图保护,无法查

  • 微信小程序使用slot把weapp的遮罩层传

    微信小程序使用slot把weapp的遮罩层传

腾讯云代理商
海外云服务器