安装stylus-loader stylus老是报UnhandledPromiseRejectionWarning: TypeError: loaderContext.getResolve is not a function和Module build failed: TypeError: this.getOptions is not a function的原因,那是因为stylus和stylus-loader的版本兼容问题
在有的电脑上是stylus 0.52.8 和 stylus-loader 4.3.1
stylus 0.52.5 和 stylus-loader 3.0.1
但我安装尝试之后,
"stylus": "^0.54.8", "stylus-loader": "^3.0.2",程序才被运行出来
卸载stylus、stylus-loader
npm uninstall stylus stylus-loader
安装
npm install stylus@0.54.8 stylus-loader@3.0.2
博客指出安装stylus-loader和stylus报错是版本兼容问题,列举了不同电脑上的版本组合,如stylus 0.52.8和stylus-loader 4.3.1、stylus 0.52.5和stylus-loader 3.0.1,经安装尝试后程序才得以运行,还提到卸载和安装操作。
1627

被折叠的 条评论
为什么被折叠?



