npm - 在这个项目中找不到 expo - 你运行 yarn / npm install 了吗?
问题描述
我无法执行expo start
命令。
错误信息:
PS C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project> expo start
Starting project at C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project
Unable to find expo in this project - have you run yarn / npm install yet?
├─ action (C:\Users\Jacky Goyal\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:34:11)
├─ C:\Users\Jacky Goyal\AppData\Roaming\npm\node_modules\expo-cli\src\commands\start.ts:135:22
└─ expo start (C:\Users\Jacky Goyal\AppData\Roaming\npm\node_modules\expo-cli\src\exp.ts:350:7)
PS C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project> npm install
added 28 packages, removed 46 packages, changed 34 packages, and audited 653 packages in 8s
17 packages are looking for funding
run `npm fund` for details
7 low severity vulnerabilities
Some issues need review, and may require choosing
a different dependency.
Run `npm audit` for details.
PS C:\Users\Jacky Goyal\OneDrive\Desktop\rn1\my-project> npm audit
npm 审计报告
node-fetch <=2.6.0 || 3.0.0-beta.1 - 3.0.0-beta.8
Denial of Service - https://npmjs.com/advisories/1556
No fix available
node_modules/isomorphic-fetch/node_modules/node-fetch
isomorphic-fetch 2.0.0 - 2.2.1
Depends on vulnerable versions of node-fetch
node_modules/isomorphic-fetch
fbjs 0.7.0 - 1.0.0
Depends on vulnerable versions of isomorphic-fetch
node_modules/fbjs
metro 0.22.1 - 0.63.0
Depends on vulnerable versions of fbjs
Depends on vulnerable versions of metro-config
node_modules/metro
@react-native-community/cli *
Depends on vulnerable versions of metro
Depends on vulnerable versions of react-native
node_modules/@react-native-community/cli
react-native <=0.0.0-ffdfbbec0 || 0.22.0-rc - 0.64.0-rc.4
Depends on vulnerable versions of @react-native-community/cli
Depends on vulnerable versions of fbjs
node_modules/react-native
metro-config <=0.63.0
Depends on vulnerable versions of metro
node_modules/metro-config
7 low severity vulnerabilities\
Some issues need review, and may require choosing
a different dependency```
解决方案
- 将 expo 版本从 "^1.0.0" 更改为 "~41.0.1" (package.json)
- npm 安装
- npm 开始
推荐阅读
- microservices - 微服务架构中的 Worker 服务
- abp - 如何在 Blazor UI 中更改 DateTime 选择器时间格式
- windows - 尝试更正 Windows 注册表中的文件名
- variables - 运行计时器时出错:Emacs init.el 中的(无效变量消息)
- java - 当我尝试使用 WSL2 在 IntelliJ 中运行 HelloWorld 应用程序时出现“AccessDeniedException”
- python - 如何检查 DataFrame 的列是否包含浮点类型?
- html - 我的页脚没有出现样式,而是使用 html 和 css
- sql - 获得 1 小时结束记录
- reactjs - 已解决:react-leaflet 地图开启但不更新地理定位,whenCreated 不保存地图实例
- mysql - MySQL 请求节点树