mac M1Pro 使用hbuilderx 启动微信小程序,编译报错
Module build failed (from ./node_modules/_mini-css-extract-plugin@0.9.0@mini-css-extract-plugin/dist/loader.js):
13:10:23.014 ModuleError: Module Error (from ./node_modules/_sass-loader@10.2.0@sass-loader/dist/cjs.js):
13:10:23.019 Missing binding /Users/duqian/WebstormProjects/uniapp-approve-admin/node_modules/_node-sass@5.0.0@node-sass/vendor/darwin-x64-72/binding.node
13:10:23.019 Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 12.x
13:10:23.024 Found bindings for the following environments:
13:10:23.024 - OS X Unsupported architecture (arm64) with Node.js 15.x
13:10:23.039 This usually happens because your environment has changed since running npm install
.
13:10:23.039 Run npm rebuild node-sass
to download the binding for your current environment.
13:10:23.045 at Object.emitError (/Users/duqian/WebstormProjects/uniapp-approve-admin/node_modules/_webpack@4.46.0@webpack/lib/NormalModule.js:173:6)
13:10:23.049 at getSassImplementation (/Users/duqian/WebstormProjects/uniapp-approve-admin/node_modules/_sass-loader@10.2.0@sass-loader/dist/utils.js:59:21)
13:10:23.050 at Object.loader (/Users/duqian/WebstormProjects/uniapp-approve-admin/node_modules/_sass-loader@10.2.0@sass-loader/dist/index.js:35:59)
13:10:23.055 ERROR Build failed with errors.
但是我其他项目能正常启动
744934982 (作者)
怎么修改成调用本地的node而不是内置。我其他项目的node只能用15版本才能解决node-sass报错问题
2022-01-18 09:27
744934982 (作者)
回复 DCloud_HB_WDL: 我运行终端类型改成了外部终端,配置了node路径 但是,没有用啊
2022-01-18 18:07
744934982 (作者)
回复 DCloud_HB_WDL: /Users/用户名/.nvm/versions/node/v15.14.0/bin/node
2022-01-18 18:08
DCloud_HB_WDL
回复 744934982: 看图标红部分。
2022-01-18 18:27
744934982 (作者)
回复 DCloud_HB_WDL: 哪还有其他解决方案吗,我总不能一直来回更改node版本吧,调用小程序开发者工具能不能通过外部命令行来
2022-01-19 16:27
DCloud_HB_WDL
回复 744934982: 加下HBuilderX官方qq群: 793046085, 进群at管理
2022-01-19 18:38