NervJS / taro-ui

一款基于 Taro 框架开发的多端 UI 组件库
https://taro-ui.taro.zone
MIT License
4.52k stars 756 forks source link

taro2.2.6 安装 taro-ui 后无法启动 #1082

Open 4nix opened 4 years ago

4nix commented 4 years ago

Taro UI 版本信息

v2.3.4

问题描述

使用taro创建项目后,可以启动 npm run dev:h5, 安装taro-ui后无法启动,提示“项目依赖 @tarojs/taro-h5 未安装,或安装有误,请重新安装此依赖”,已增加 esnextModules: ['taro-ui'] 配置

复现步骤

  1. taro init xxx
  2. cd xxx
  3. npm install taro-ui
  4. npm run dev:h5

复现代码

  1. taro init xxx
  2. cd xxx
  3. npm install taro-ui
  4. npm run dev:h5

报错信息

警告 依赖安装 项目依赖 @tarojs/taro-h5 未安装,或安装有误,请重新安装此依赖! npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! cloud@1.0.0 build:h5: taro build --type h5 "--watch" npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the cloud@1.0.0 build:h5 script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

系统信息

👽 Taro v2.2.6

Taro CLI 2.2.6 environment info: System: OS: macOS 10.14.6 Shell: 5.3 - /bin/zsh Binaries: Node: 12.8.0 - /usr/local/bin/node Yarn: 1.17.3 - /usr/local/bin/yarn npm: 6.13.6 - /usr/local/bin/npm npmPackages: @tarojs/components: 2.2.6 => 2.2.6 @tarojs/components-qa: 2.2.6 => 2.2.6 @tarojs/mini-runner: 2.2.6 => 2.2.6 @tarojs/router: 2.2.6 => 2.2.6 @tarojs/taro-alipay: 2.2.6 => 2.2.6 @tarojs/taro-qq: 2.2.6 => 2.2.6 @tarojs/taro-quickapp: 2.2.6 => 2.2.6 @tarojs/taro-rn: 2.2.6 => 2.2.6 @tarojs/taro-swan: 2.2.6 => 2.2.6 @tarojs/taro-tt: 2.2.6 => 2.2.6 @tarojs/taro-weapp: 2.2.6 => 2.2.6 @tarojs/webpack-runner: 2.2.6 => 2.2.6 eslint-config-taro: 2.2.6 => 2.2.6 eslint-plugin-taro: 2.2.6 => 2.2.6 nerv-devtools: ^1.5.5 => 1.5.6 stylelint-config-taro-rn: 2.2.6 => 2.2.6 stylelint-taro-rn: 2.2.6 => 2.2.6 taro-ui: ^2.3.4 => 2.3.4

补充信息

taro-ui-bot[bot] commented 4 years ago

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

Garfield550 commented 4 years ago

你确实没有 @tarojs/taro-h5 这个依赖啊