node.js - 无法安装 react 导航和手势

标签 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

最佳答案

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

yarn add @react-navigation/native

关于node.js - 无法安装 react 导航和手势,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63886167/

相关文章:

node.js - 我怎样才能 Jest 用 es6(没有 typescript )模拟 Prisma 客户端?

javascript - Router.use() 需要中间件功能但未定义

ReactJS - props 还是 propTypes?

javascript - 用户在网页 + Iframe 上花费的时间

javascript - react native typescript : Can't find variable: React

javascript - Babel 使用通配符编译路径但保留文件夹结构

javascript - 具有不同逻辑的类似 React 组件

react-native - 选择大型视频文件 react native 博览会图像选择器

使用 resizeMode 封面截断的图像

node.js - 如何让前端知道您的服务器已成功检索访问 token