Реагировать на собственную ошибку инициализации: не удалось найти пакет «error-ex» в реестре «npm» - PullRequest
7 голосов
/ 12 февраля 2020

Я уже работаю над реактивным родным проектом. Тем не менее, мне нужно создать новый образец проекта. Ниже ошибка произошла, когда я попытался инициировать новый пример проекта, используя react-native init Project001, и я уже установил реагирует на родной 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.

Ответы [ 2 ]

0 голосов
/ 13 февраля 2020

попробуйте это Уважаемый в вашем терминале npm config set registry https://skimdb.npmjs.com/registry

0 голосов
/ 12 февраля 2020

Я думаю, что проблема все еще существует? Я испытываю такую ​​ошибку:

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)
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...