英文:
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.
-
npx expo doctor --fix-dependencies
result in:
$ expo doctor is not supported in the local CLI, please use npx
expo-doctor instead -
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
- 首先复制您当前的Expo项目。
- 删除所有的node模块。
- 使用以下命令安装node模块:
yarn
- 然后您的问题
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)
可以解决。
英文:
- First make a copy of your current Expo project.
- Delete all your node modules.
- Install node modules with command
yarn
- 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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论