expo doctor not supported, expo-cli doctor not fixing dependencies

huangapple go评论56阅读模式
英文:

expo doctor not supported, expo-cli doctor not fixing dependencies

问题

I am unable to run npx expo doctor

$ npx expo doctor

  $ expo doctor is not supported in the local CLI, please use expo-cli doctor instead

Tried out expo-cli doctor --fix-dependencies but it does not appear to have changed my packages.json.

$ expo-cli doctor --fix-dependencies
WARNING: The legacy expo-cli does not support Node +17. Migrate to the versioned Expo CLI (npx expo).
Expected package @expo/config-plugins@~6.0.0
Found invalid:
  @expo/config-plugins@4.1.1
  (for more info, run: npm why @expo/config-plugins)

How do I fix the invalid packages issue?

英文:

I am unable to run npx expo doctor

$ npx expo doctor

  $ expo doctor is not supported in the local CLI, please use expo-cli doctor instead

Tried out expo-cli doctor --fix-dependencies but it does not appear to have changed my packages.json.

$ expo-cli doctor --fix-dependencies
WARNING: The legacy expo-cli does not support Node +17. Migrate to the versioned Expo CLI (npx expo).
Expected package @expo/config-plugins@~6.0.0
Found invalid:
  @expo/config-plugins@4.1.1
  (for more info, run: npm why @expo/config-plugins)

How do I fix the invalid packages issue?

答案1

得分: 3

npx expo-doctor

然后

npx expo install --fix

文档在这里
https://docs.expo.dev/more/expo-cli/

英文:

I upgraded to the latest Expo SDK 49 and encountered the same problem as you. The following commands worked for me.

npx expo-doctor

then

npx expo install --fix

Documentation is here
https://docs.expo.dev/more/expo-cli/

The commands below no longer worked for me.

  1. npx expo doctor --fix-dependencies

    result in:

    $ expo doctor is not supported in the local CLI, please use npx
    expo-doctor instead

  2. expo-cli doctor --fix-dependencies

    result in:

    'expo-cli doctor' is not supported for SDK 46 and higher. Use 'npx
    expo-doctor' instead.

答案2

得分: 1

  1. 首先复制您当前的Expo项目。
  2. 删除所有的node模块。
  3. 使用以下命令安装node模块:
yarn
  1. 然后您的问题
Expected package @expo/config-plugins@~6.0.0
Found invalid:
  @expo/config-plugins@4.1.1
  (for more info, run: npm why @expo/config-plugins)

可以解决。

英文:
  1. First make a copy of your current Expo project.
  2. Delete all your node modules.
  3. Install node modules with command
yarn
  1. Then your issue of
Expected package @expo/config-plugins@~6.0.0
Found invalid:
  @expo/config-plugins@4.1.1
  (for more info, run: npm why @expo/config-plugins)

can be solved.

答案3

得分: 0

从您的错误消息来看,安装最新版本应该可以解决您的问题。

npm install @expo/config-plugins@latest

然后,使用以下命令检查您的 Expo 配置插件是否已更新到版本6.00或更高版本,如果版本仍然较低,请使用--force标志重试上述命令。

npm ls @expo/config-plugins

完成后,运行以下命令来修复任何其他问题。

expo-cli doctor --fix-dependencies
英文:

From your error messages, installing the latest version should fix your problems.

npm install @expo/config-plugins@latest

Then use the command below to check if your expo config-plugin has been updated to a version equal to or higher than 6.00, if it is still lower, retry the above command with the --force flag

npm ls @expo/config-plugins

Once that is done, run the command below to fix any other issue.

expo-cli doctor --fix-dependencies

huangapple
  • 本文由 发表于 2023年4月10日 22:17:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/75977890.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定