更新
Taro 提供了更新命令來更新 CLI 工具自身和項目中 Taro 相關的依賴
更新 Taro CLI 工具
-
# taro
-
$ taro update self
-
# npm
-
npm i -g @tarojs/cli@latest
-
# yarn
-
yarn global add @tarojs/cli@latest
更新項目中 Taro 相關的依
$ taro update project
還會報一下錯誤
taro Cannot read property 'css' of undefined

看着報錯信息: 安裝缺少的包

報錯信息

更新npm

mac --- command+T 重新打開終端新標簽 重啟項目就可以了
-------------------------------------
npm cache clean --force
參考鏈接:
npm view indicative versions
https://blog.csdn.net/weixin_34409741/article/details/86134748
https://segmentfault.com/q/1010000017932421