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

如何使用npm卸载项目中的expo-modules?

卸载 Expo Modules(使用 npm)
  • 首先在项目根目录执行核心卸载命令,移除 Expo Modules 的核心包:

    npm uninstall expo
    
  • 若项目中还安装了其他 expo- 前缀的附属模块(如 expo-constants、expo-font 等),可以查看 package.json 的 dependencies 字段,将这些模块一并卸载。示例命令:

    npm uninstall expo-constants expo-font expo-splash-screen
    
  • 如果你想批量清理所有 Expo 相关依赖,可执行以下命令(会自动识别并卸载所有 expo- 开头的包):

    npm uninstall $(npm ls --parseable | grep expo | grep -v node_modules | sort -u)
    
  • (可选)若卸载后出现缓存相关问题,可清理 npm 缓存:

    npm cache clean --force
    

内容的提问来源于stack exchange,提问作者chris aimsworth

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.28 22:19:55