mac下saber编译失败提示node-sass版本不支持的问题

Saber 未结 1 971
kolehank
kolehank 剑圣 2021-03-10 23:06

 error  in ./src/styles/common.scss


Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):

ModuleBuildError: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):

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

For more information on which environments are supported please see:

https://github.com/sass/node-sass/releases/tag/v4.13.1

    at module.exports (/Users/rooy/code/source2020/Saber/node_modules/node-sass/lib/binding.js:13:13)

    at Object.<anonymous> (/Users/rooy/code/source2020/Saber/node_modules/node-sass/lib/index.js:14:35)

    at Module._compile (internal/modules/cjs/loader.js:1063:30)

    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)

    at Module.load (internal/modules/cjs/loader.js:928:32)

    at Function.Module._load (internal/modules/cjs/loader.js:769:14)

    at Module.require (internal/modules/cjs/loader.js:952:19)

    at require (internal/modules/cjs/helpers.js:88:18)



2.8.0里面saber依赖的写的是4.12.0,我本机node版本是14,看node-sass的版本依赖说明,node版本14支持的node-sass最少是4.14.0,将package.json里面的依赖版本调高一点,重新yarn install就应该正常了

1条回答
  • 2021-03-11 16:54

    参考下这个:https://www.jianshu.com/p/92afe92db99f

    0 讨论(0)
提交回复