无法在这个项目中找到expo-你运行过yarn/npminstall了吗?

我无法执行expo start命令。

错误信息:

PS C:UsersJacky GoyalOneDriveDesktoprn1my-project> expo start
Starting project at C:UsersJacky GoyalOneDriveDesktoprn1my-project

Unable to find expo in this project - have you run yarn / npm install yet?
    ?? action (C:UsersJacky GoyalAppDataRoamingnpmnode_modulesexpo-clisrccommandsstart.ts:34:11)
    ?? C:UsersJacky GoyalAppDataRoamingnpmnode_modulesexpo-clisrccommandsstart.ts:135:22
    ?? expo start (C:UsersJacky GoyalAppDataRoamingnpmnode_modulesexpo-clisrcexp.ts:350:7)
PS C:UsersJacky GoyalOneDriveDesktoprn1my-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:UsersJacky GoyalOneDriveDesktoprn1my-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```

回答

  1. 将博览会版本从“^1.0.0”更改为“~41.0.1”(package.json)
  2. 安装
  3. 启动

回答

我也面临这个错误。所以我在终端中运行npm命令。

npm install

您不需要更改博览会版本。你只需重新安装它。


以上是无法在这个项目中找到expo-你运行过yarn/npminstall了吗?的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>