Colintao
Colintao
  • 发布:2022-06-16 14:47
  • 更新:2023-02-23 16:33
  • 阅读:706

uniapp hbuilderx mac m1 云打包提示错误【报Bug】

分类:HBuilderX

产品分类: HbuilderX

PC开发环境操作系统: Mac

PC开发环境操作系统版本号: 12.4

HBuilderX版本号: 3.4.15

操作步骤:

mac m1 芯片云打包 提示node-sass问题,按照提示步骤以及相关资料都不能解决,我们公司同部门不是m1芯片的mac都可以正常打包,目前node-sass版本是:4.14.1,node版本:14.15.0

预期结果:

正常云打包

实际结果:

Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
[HBuilder] 13:57:12.552 Error: Missing binding /Users/tc_mm_002/Documents/CODE/zmn-sass-brand-stand/node_modules/node-sass/vendor/darwin-x64-72/binding.node
[HBuilder] 13:57:12.556 Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 12.x
[HBuilder] 13:57:12.556 Found bindings for the following environments:
[HBuilder] 13:57:12.563 - OS X 64-bit with Node.js 14.x
[HBuilder] 13:57:12.563 This usually happens because your environment has changed since running npm install.
[HBuilder] 13:57:12.579 Run npm rebuild node-sass to download the binding for your current environment.
[HBuilder] 13:57:12.596 at module.exports (/Users/tc_mm_002/Documents/CODE/zmn-sass-brand-stand/node_modules/node-sass/lib/binding.js:15:13)
[HBuilder] 13:57:12.596 at Object.<anonymous> (/Users/tc_mm_002/Documents/CODE/zmn-sass-brand-stand/node_modules/node-sass/lib/index.js:14:35)
[HBuilder] 13:57:12.612 at Module._compile (internal/modules/cjs/loader.js:999:30)
[HBuilder] 13:57:12.629 at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
[HBuilder] 13:57:12.646 at Module.load (internal/modules/cjs/loader.js:863:32)
[HBuilder] 13:57:12.662 at Function.Module._load (internal/modules/cjs/loader.js:708:14)
[HBuilder] 13:57:12.679 at Module.require (internal/modules/cjs/loader.js:887:19)
[HBuilder] 13:57:12.680 at require (internal/modules/cjs/helpers.js:74:18)
[HBuilder] 13:57:12.696 at getDefaultSassImplementation (/Users/tc_mm_002/Documents/CODE/zmn-sass-brand-stand/node_modules/sass-loader/dist/utils.js:43:10)
[HBuilder] 13:57:12.712 at getSassImplementation (/Users/tc_mm_002/Documents/CODE/zmn-sass-brand-stand/node_modules/sass-loader/dist/utils.js:57:30)
[HBuilder] 13:57:12.729 at Object.loader (/Users/tc_mm_002/Documents/CODE/zmn-sass-brand-stand/node_modules/sass-loader/dist/index.js:34:59)

bug描述:

2022-06-16 14:47 负责人:无 分享
已邀请:
DCloud_HB_WDL

DCloud_HB_WDL

HBuilderX内置node版本是v12.22.1, uni-app项目编译、打包,都是使用的此node。

而你项目下的sass是使用node 14安装的。

  • Colintao (作者)

    同事node也是14,我这边切换成12也不得行,试过的

    2022-06-16 15:13

  • Colintao (作者)

    切换成12.22.1就可以了,感谢大佬,我上次切成12.10好像不得行

    2022-06-16 15:30

  • 1***@163.com

    回复 Colintao: 问题解决了么,请求回复

    2023-02-23 17:51

1***@163.com

1***@163.com

你好,我问一下你解决了么,我这边也是这个问题

要回复问题请先登录注册