mpvue 在nodev10下引入sass会报错, 原因在于fibers不支持高版本node

hsgswve4  于 2022-10-20  发布在  其他
关注(0)|答案(2)|浏览(171)

[扼要问题描述]

在node v10下引入sass会报错.

mpvue 版本号:

[mpvue@^2.0.0]

最小化复现代码:

问题复现步骤:

尝试在中引用lang="scss" 然后会不断地报错, 经过研究怀疑是因为fibers这个包不支持太新的node:

'''
npm WARN sass-loader@8.0.0 requires a peer of fibers@>= 3.1.0 but none is installed. You must install peer dependencies yourself.

$ npm i fibers@>= 3.1.0 --save
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.com/3.1.0 - Not found
npm ERR! 404
npm ERR! 404 '3.1.0@latest' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

'''

hjzp0vay

hjzp0vay1#

是不是你的sass-loader版本太高了,我用的7.2.0版本,是可以的

vojdkbi0

vojdkbi02#

@wuzhifeibuhuifei 感谢, 果然可以了.

相关问题