You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

执行依赖重装后仍提示expo等依赖未安装的技术求助

Fixing "Dependency Not Installed" Warnings with exp start -c

Hey there, let's troubleshoot those persistent dependency warnings you're seeing. Even after running full dependency resets, those warnings mean your project can't find expo, react-native, and react-native-render-html—here's how to fix it step by step:

1. Verify Your package.json Dependencies

First, double-check that your package.json actually lists these packages in its dependencies section. If they're missing, yarn has no reason to install them! Your dependencies should look something like this (adjust versions to match your project's compatibility):

"dependencies": {
  "expo": "^49.0.0",
  "react-native": "0.72.3",
  "react-native-render-html": "^6.3.4",
  // ... other project dependencies
}

Add any missing packages to this section and save the file.

2. Re-Run Your Clean Install Command

With the updated package.json, execute your full cleanup and install sequence again:

watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install

Keep an eye on the terminal output this time—you should see logs showing these three packages being downloaded and installed. If you get version mismatch errors, adjust the version numbers in package.json to match versions compatible with your Expo SDK version.

3. Clear Lock File Cache (If Needed)

Sometimes outdated lock files (yarn.lock) can prevent new dependencies from being installed properly. If you still don't see the packages after reinstalling:

  • Back up your yarn.lock file
  • Delete the original yarn.lock
  • Re-run yarn install

This will generate a fresh lock file with your updated dependencies.

4. Ensure You're Running Commands in the Right Directory

Make sure you're executing exp start -c from your project's root directory (the same folder where package.json lives). If you're in a subfolder, exp won't be able to locate your installed dependencies.

5. Update expo-cli

Outdated expo-cli versions can sometimes cause detection issues. Update it globally with:

yarn global add expo-cli
# Or if using npm:
npm install -g expo-cli

Then try running exp start -c again.


内容的提问来源于stack exchange,提问作者Ethan Yan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 06:35:14