taro安装使用 Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)错误

时间:2024-03-21 09:37:44

1、  安装node.js

  官网下载:https://nodejs.org/en/  下载推荐版本;

2、  Npm安装慢,可以使用cnpm,安装淘宝镜像:

  npm install -g cnpm --registry=https://registry.npm.taobao.org

3、 全局安装 Taro 开发工具 @tarojs/cli

  cnpm install -g @tarojs/cli

4、  进入项目目录,使用命令创建模板项目

  taro init myApp

  根据提示选择自己需要的安装

  taro安装使用  Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)错误

5、  以h5为例,创建项目完毕,运行项目

  cd myApp

  npm run dev:h5

  运行项目报错:

  ./node_modules/@tarojs/components/src/components/text/style/index.scss)
  Module build failed (from ./node_modules/sass-loader/lib/loader.js):
  Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)
  For more information on which environments are supported please see:
  https://github.com/sass/node-sass/releases/tag/v4.8.3

  taro安装使用  Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)错误

  需在当前项目重新安装sass:

  cnpm install node-sass

  taro安装使用  Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (64)错误

  到此,项目便可正常运行。

6、taro不仅支持微信小程序还支持百度小程序,支付宝小程序,H5,react native等等,具体可进入官网了解更多,官网地址:

https://nervjs.github.io/taro/docs/GETTING-STARTED.html