「Taro」学习笔记

在线文档

使用

安装

npm i -g @tarojs/cli

image-20230526141532256

创建项目

taro init

image-20230526141825108

运行项目

npm install

npm run dev:weapp

报错解决

Error: Cannot find module ‘@tarojs/plugin-platform-weapp’ from…

https://blog.csdn.net/weixin_42260975/article/details/119206622

Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime

解决方案:

不用回退node版本,而是升级node-sass。

update你的sass版本即可 - npm rebuild node-sass

或者自己手动升级:

  1. 先卸载 - npm uninstall –save node-sass

  2. 清除缓存 - npm cache clean -f

  3. 升级node-sass模块 - npm install –save node-sass

npm WARN using --force Recommended protections disabled

在使用 npm cache clean –force 命令时报的错。可以使用 npm cache verify 命令。


214 字