找不到插件依赖 @tarojs/plugin-platform-h5,请先在项目中安装 发表于 2024-05-04 更新于 2024-06-17 运行一个 Taro 的项目,安装完相关依赖后执行命令报错 执行步骤 yarn install yarn run start 1234567891011121314151617正在执行任务: yarn run start yarn run v1.22.19$ npm run dev:h5> renthouse-taro@1.0.0 dev:h5> npm run build:h5 -- --watch> renthouse-taro@1.0.0 build:h5> taro build --type h5 --watch 👽 Taro v3.6.25找不到插件依赖 "@tarojs/plugin-platform-h5",请先在项目中安装,项目路径:D:\xxx\xxx\renthouse-taroerror Command failed with exit code 1.info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 原因因为我之前安装过 Taro 最新版本的 cli , 和现有的 Taro 版本不兼容 1234taro --version👽 Taro v3.6.253.6.25 解决方案 npm uninstall -g @tarojs/cli # 卸载 Trao npm install -g @tarojs/cli@3.0.29 # 安装指定版本 Trao 也有可能 nodejs 版本过低和 taro/cli 不兼容,nvm 切换 16.x 以上版本试试