taro多端开发踩过的坑!!!

1、Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93)
For more information on which environments are supported please see:

通常是node版本较高导致

推荐文章:mac下关于node版本的切换_mac切换node版本_月亮睡在雾里的博客-CSDN博客

2、找不到依赖 "@tarojs/plugin-platform-alipay",请先在项目中安装

 解决方案:通常是taro版本过高导致,版本降级即可

cnpm i -g @tarojs/cli@3.0.8

3、同时编译微信、支付宝、h5等多端应用(需在dist文件下生成不同的包)。

解决方法:根目录 config/index.js 下,调整:outputRoot: `dist/${process.env.TARO_ENV}`

4、新建的项目,VsCode莫名提示报错

Parsing error: No Babel config file detected for /Users/txp/Desktop/Project/txp/xcx/Taro-MilkOrder-24h/config/dev.js. Either disable config file checking with requireConfigFile: false, or configure Babel so that it can find the config files.eslint

解决方法:根目录新建 .eslintrc.json,并写入

{
  "extends": [
    "taro/react",
    "plugin:prettier/recommended"
  ]
}

5、不要使用 CoverView,CoverImage 标签,存在很严重的样式适配问题,使用View,Image代替

持续更新中。。。 

目录

1、Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93)For more information on which environments are supported please see:

2、找不到依赖 "@tarojs/plugin-platform-alipay",请先在项目中安装

3、同时编译微信、支付宝、h5等多端应用(需在dist文件下生成不同的包)。

4、新建的项目,VsCode莫名提示报错

5、不要使用 CoverView,CoverImage 标签,存在很严重的样式适配问题,使用View,Image代替


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值