установка зависимых узлов сломала мое приложение - PullRequest
0 голосов
/ 15 января 2019

Я добавлял собственные элементы реакции в свой проект, устанавливая его с помощью «npm install --save Reaction-native-elements», но это сломало мой проект. Я не могу найти правильное решение. Я не знаю, как это исправить.

После установки реагируют родные элементы, Я получаю сообщение об ошибке "Ошибка: React Native не установлен. Пожалуйста, запустите npm install в каталоге вашего проекта. [21:03:06] Не удалось запустить проект. Пожалуйста, исправьте ошибки и перезапустите проект. [21:03:06] Установите EXPO_DEBUG = true в вашем env для просмотра трассировки стека. "

Это мой первый вопрос о стековом потоке. Если я сделал какие-либо ошибки, я сожалею об этом.

C:\>cd react native project

C:\react native project>expo init just1
? Choose a template: expo-template-blank
? Yarn v1.12.3 found. Use Yarn to install dependencies? Yes
[20:49:42] Extracting project files...
[20:49:45] Customizing project...
[20:49:45] Installing dependencies...
yarn install v1.12.3
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.4: The platform "win32" is incompatible with this module.
info "fsevents@1.2.4" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "expo > expo-background-fetch@1.0.0" has unmet peer dependency "expo-task-manager-interface@~1.0.0".
warning "expo > expo-google-sign-in@2.0.0" has incorrect peer dependency "react-native@^0.55.4".
warning "expo > expo-location@2.0.0" has unmet peer dependency "expo-task-manager-interface@~1.0.0".
warning "expo > react-native-reanimated@1.0.0-alpha.11" has incorrect peer dependency "react@16.0.0-alpha.6".
warning "expo > react-native-reanimated@1.0.0-alpha.11" has incorrect peer dependency "react-native@^0.44.1".
warning "expo > expo-asset > url-loader@1.1.2" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset@0.49.2" has unmet peer dependency "@babel/core@*".
warning "expo > babel-preset-expo > @babel/plugin-proposal-decorators@7.2.3" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-syntax-export-default-from@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-syntax-dynamic-import@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-export-default-from@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-computed-properties@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-classes@7.2.2" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-for-of@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-arrow-functions@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-destructuring@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-function-name@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-exponentiation-operator@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-block-scoping@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-react-display-name@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-react-jsx@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-parameters@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-literals@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-object-assign@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-regenerator@7.0.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-runtime@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-sticky-regex@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-shorthand-properties@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-spread@7.2.2" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-react-jsx-source@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-template-literals@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-typescript@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-unicode-regex@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > @babel/plugin-proposal-decorators > @babel/helper-create-class-features-plugin@7.2.3" has unmet peer dependency "@babel/core@^7.0.0".
warning "expo > babel-preset-expo > @babel/plugin-proposal-decorators > @babel/plugin-syntax-decorators@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-optional-catch-binding > @babel/plugin-syntax-optional-catch-binding@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-object-rest-spread > @babel/plugin-syntax-object-rest-spread@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-optional-chaining > @babel/plugin-syntax-optional-chaining@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-proposal-nullish-coalescing-operator > @babel/plugin-syntax-nullish-coalescing-operator@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-react-jsx > @babel/plugin-syntax-jsx@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-flow-strip-types > @babel/plugin-syntax-flow@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
warning "expo > babel-preset-expo > metro-react-native-babel-preset > @babel/plugin-transform-typescript > @babel/plugin-syntax-typescript@7.2.0" has unmet peer dependency "@babel/core@^7.0.0-0".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 151.57s.

Your project is ready at C:\react native project\just1
To get started, you can type:

  cd just1
  yarn start


C:\react native project>cd just1

C:\react native project\just1>npm install --save react-native-elements
npm WARN rm not removing C:\react native project\just1\node_modules\.bin\uuid.cmd as it wasn't installed by C:\react native project\just1\node_modules\uuid
npm WARN rm not removing C:\react native project\just1\node_modules\.bin\uuid as it wasn't installed by C:\react native project\just1\node_modules\uuid
npm WARN rm not removing C:\react native project\just1\node_modules\.bin\json5.cmd as it wasn't installed by C:\react native project\just1\node_modules\json5
npm WARN rm not removing C:\react native project\just1\node_modules\.bin\json5 as it wasn't installed by C:\react native project\just1\node_modules\json5
npm WARN rm not removing C:\react native project\just1\node_modules\.bin\jsesc.cmd as it wasn't installed by C:\react native project\just1\node_modules\jsesc
npm WARN rm not removing C:\react native project\just1\node_modules\.bin\jsesc as it wasn't installed by C:\react native project\just1\node_modules\jsesc

> react-native-elements@0.19.1 postinstall C:\react native project\just1\node_modules\react-native-elements
> opencollective postinstall


     *** Thank you for using react-native-elements! ***

Please consider donating to our open collective
     to help us maintain this package.

  https://opencollective.com/react-native-elements/donate

                    ***

npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN react-native-maps@0.22.1 requires a peer of react-native@>= 0.51 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-elements@0.19.1 requires a peer of react-native-vector-icons@^4.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN expo-google-sign-in@2.0.0 requires a peer of react-native@^0.55.4 but none is installed. You must install peer dependencies yourself.
npm WARN expo-react-native-adapter@2.0.0 requires a peer of react-native@^0.57.1 but none is installed. You must install peer dependencies yourself.
npm WARN lottie-react-native@2.5.0 requires a peer of react-native@>=0.46 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-branch@2.2.5 requires a peer of react-native@>=0.40.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-gesture-handler@1.0.12 requires a peer of react-native@>= 0.50.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-reanimated@1.0.0-alpha.11 requires a peer of react@16.0.0-alpha.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-reanimated@1.0.0-alpha.11 requires a peer of react-native@^0.44.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-screens@1.0.0-alpha.19 requires a peer of react-native@* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-view-shot@2.5.0 requires a peer of react-native@* but none is installed. You must install peer dependencies yourself.
npm WARN react-native-svg@8.0.10 requires a peer of react-native@>=0.50.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-proposal-decorators@7.2.3 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN metro-react-native-babel-preset@0.49.2 requires a peer of @babel/core@* but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-decorators@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/helper-create-class-features-plugin@7.2.3 requires a peer of @babel/core@^7.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-proposal-object-rest-spread@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-proposal-nullish-coalescing-operator@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-proposal-export-default-from@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-proposal-class-properties@7.2.3 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-proposal-optional-chaining@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-proposal-optional-catch-binding@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-dynamic-import@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-arrow-functions@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-export-default-from@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-block-scoping@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-classes@7.2.2 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-computed-properties@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-destructuring@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-exponentiation-operator@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-for-of@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-flow-strip-types@7.2.3 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-function-name@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-literals@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-modules-commonjs@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-object-assign@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-react-jsx@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-parameters@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-react-jsx-source@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-react-display-name@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-runtime@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-shorthand-properties@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-regenerator@7.0.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-spread@7.2.2 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-sticky-regex@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-template-literals@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-unicode-regex@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-transform-typescript@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-nullish-coalescing-operator@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-object-rest-spread@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-optional-catch-binding@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-optional-chaining@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-flow@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-jsx@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN @babel/plugin-syntax-typescript@7.2.0 requires a peer of @babel/core@^7.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN url-loader@1.1.2 requires a peer of webpack@^3.0.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-safe-module@1.2.0 requires a peer of react-native@* but none is installed. You must install peer dependencies yourself.

+ react-native-elements@0.19.1
added 17 packages from 15 contributors, removed 412 packages and updated 342 packages in 389.605s

C:\react native project\just1>expo start
[21:02:38] Starting project at C:\react native project\just1
[21:02:45] Expo DevTools is running at http://localhost:19003
[21:02:45] Opening DevTools in the browser... (press shift-d to disable)
[21:03:06] Error: React Native is not installed. Please run `npm install` in your project directory.
[21:03:06] Couldn't start project. Please fix the errors and restart the project.
[21:03:06] Set EXPO_DEBUG=true in your env to view the stack trace.

C:\react native project\just1>

My project should have worked fine but it actually started giving me bad errors

Ответы [ 2 ]

0 голосов
/ 02 марта 2019

У меня возникла та же проблема: «Исправление аудита npm» исправлено для меня. Надеюсь, это поможет

0 голосов
/ 15 января 2019

Изначально при настройке выставки используется пряжа. Если вы используете npm для установки пакета, то npm склонен удалять пакеты, которые были установлены с помощью пряжи, поскольку package-lock.json

нет

Это можно исправить, запустив npm i, и он должен переустановить удаленные зависимости.

Вы должны использовать либо yarn, либо npm, но не комбинацию обоих, поскольку это может привести к проблемам.

...