gpt4 book ai didi

javascript - React Native初始化错误: Couldn't find package "error-ex" on the "npm" registry

转载 作者:行者123 更新时间:2023-12-03 13:27:47 24 4
gpt4 key购买 nike

我已经在开发一个 React Native 项目了。但是,我需要创建一个新的示例项目。当我尝试使用 react-native init Project001 启动新的示例项目并且我已经全局安装了 react native cli 时,发生了以下错误。有人能帮忙吗 ?

感谢您的帮助!

$ react-native init Project001
This will walk you through creating a new React Native project in D:\Sample project\Project001
Using yarn v1.21.1
Installing react-native...
yarn add v1.21.1
info No lockfile found.
[1/4] Resolving packages...
warning react-native > fbjs-scripts > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > fbjs > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > create-react-class > fbjs > core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > metro-babel-register > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
error Couldn't find package "error-ex" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Couldn't find package "errorhandler" on the "npm" registry.
at MessageError.ExtendableBuiltin (C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:721:66)
at new MessageError (C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:750:123)
at NpmResolver.<anonymous> (C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:50683:15)
at Generator.next (<anonymous>)
at step (C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:310:30)
at C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:321:13
at process._tickCallback (internal/process/next_tick.js:68:7)
Error: Couldn't find package "error-ex" on the "npm" registry.
at MessageError.ExtendableBuiltin (C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:721:66)
at new MessageError (C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:750:123)
at NpmResolver.<anonymous> (C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:50683:15)
at Generator.next (<anonymous>)
at step (C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:310:30)
at C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:321:13
at process._tickCallback (internal/process/next_tick.js:68:7)
{ Error: Command failed: yarn add react-native --exact
at checkExecSyncError (child_process.js:629:11)
at execSync (child_process.js:666:13)
at run (C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\react-native-cli\index.js:294:5)
at createProject (C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\react-native-cli\index.js:249:3)
at C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\react-native-cli\index.js:217:7
at C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\react-native-cli\node_modules\prompt\lib\prompt.js:316:32
at C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\react-native-cli\node_modules\async\lib\async.js:142:25
at assembler (C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\react-native-cli\node_modules\prompt\lib\prompt.js:313:9)
at C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\react-native-cli\node_modules\prompt\lib\prompt.js:322:32
at C:\Users\Sanjeewa\AppData\Roaming\npm\node_modules\react-native-cli\node_modules\prompt\lib\prompt.js:597:5
status: 1,
signal: null,
output: [ null, null, null ],
pid: 6592,
stdout: null,
stderr: null }
Command `yarn add react-native --exact` failed.

最佳答案

我认为问题仍然存在?我遇到了这种错误:

Error: Couldn't find package "error-ex" on the "npm" registry.
at MessageError.ExtendableBuiltin (C:\Program Files (x86)\Yarn\lib\cli.js:721:66)
at new MessageError (C:\Program Files (x86)\Yarn\lib\cli.js:750:123)
at NpmResolver.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:50302:15)
at Generator.next (<anonymous>)
at step (C:\Program Files (x86)\Yarn\lib\cli.js:310:30)
at C:\Program Files (x86)\Yarn\lib\cli.js:321:13
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:97:5)

关于javascript - React Native初始化错误: Couldn't find package "error-ex" on the "npm" registry,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60184338/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com