Taro upgrade downgrade

Creating a project when Taro version running inconsistent versions of the project will be given as follows:

始编译项目 xxxx
错误  版本问题  Taro CLI 与本地安装运行时框架 @tarojs/taro-h5 版本不一致, 请确保版本一致!
提示  升级命令  升级到最新CLI:taro update self   升级到最新依赖库:taro update project
提示  升级文档  请参考 "常用 CLI 命令"中"更新" 章节:https://taro-docs.jd.com/taro/docs/GETTING-STARTED.html

Taro CLI:1.3.29             路径:/usr/local/lib/node_modules/@tarojs/cli/package.json
@tarojs/taro-h5:1.3.13   路径:/Users/peakchao/Code/Web/wechat-applet-app/node_modules/@tarojs/taro-h5/package.json

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build:h5: `taro build --type h5 "--watch"`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build:h5 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/peakchao/.npm/_logs/2019-12-17T08_58_48_783Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] dev:h5: `npm run build:h5 -- --watch`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] dev:h5 script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/peakchao/.npm/_logs/2019-12-17T08_58_48_799Z-debug.log

Taro remove the current version and re-install the specified version:

cd /usr/local/lib/node_modules
rm -rf \@tarojs/
#安装指定版本
npm install -g @tarojs/[email protected]
npm install -g @tarojs/[email protected]
Published 122 original articles · won praise 238 · views 760 000 +

Guess you like

Origin blog.csdn.net/c__chao/article/details/104805254