无法安装反应导航和手势

时间:2020-09-14 14:18:19

标签: node.js reactjs react-native npm

在安装时遇到此错误

npm install react-navigation
npm WARN tsutils@3.17.1 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents):
npm WARN enoent SKIPPING OPTIONAL DEPENDENCY: ENOENT: no such file or directory, rename 'C:\Users\subba-workstation\Desktop\practise\ecommerceApp\node_modules\fsevents' -> 'C:\Users\subba-workstation\Desktop\practise\ecommerceApp\node_modules\.fsevents.DELETE'

npm ERR! code ENOENT
npm ERR! path C:\Users\subba-workstation\Desktop\practise\ecommerceApp\node_modules\hoist-non-react-statics
npm ERR! dest C:\Users\subba-workstation\Desktop\practise\ecommerceApp\node_modules\.hoist-non-react-statics.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'C:\Users\subba-workstation\Desktop\practise\ecommerceApp\node_modules\hoist-non-react-statics' -> 'C:\Users\subba-workstation\Desktop\practise\ecommerceApp\node_modules\.hoist-non-react-statics.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\subba-workstation\AppData\Roaming\npm-cache\_logs\2020-09-14T13_22_46_720Z-debug.log

2 个答案:

答案 0 :(得分:2)

请尝试在项目控制台中使用Yarn命令安装它们:

yarn add @react-navigation/native

答案 1 :(得分:0)

请按照以下步骤解决此问题。

  1. npm cache clean -f
  2. remove node_module folder manually
  3. npm i
相关问题