我在app.scss
中没有进行任何更改,但是运行npm run watch
时出现以下错误:
error in ./resources/sass/app.scss
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Unsupported operation: Cannot extract a file path from a URI with a fragment component
@ ./resources/sass/app.scss 2:14-254
Asset Size Chunks Chunk Names
/js/app.js 2.46 MiB /js/app [emitted] /js/app
ERROR in ./resources/sass/app.scss
Module build failed (from ./node_modules/css-loader/index.js):
ModuleBuildError: Module build failed (from ./node_modules/sass-loader/lib/loader.js):
undefined
^
Join(null, "variables"): part 0 was null, but part 1 was not.
@import 'variables';
^^^^^^^^^^^
stdin 2:9 root stylesheet
in C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\resources\sass\app.scss (line 2, column 9)
at runLoaders (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\webpack\lib\NormalModule.js:30
at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:364:11
at C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\LoaderRunner.js:230:18
at context.callback (C:\Users\TAQI VAHEED\Desktop\#Coding\resPro\node_modules\loader-runner\lib\Loader
13)
任何帮助表示赞赏。
答案 0 :(得分:1)
最后找到了问题。这与dart-sass
v4.x.x使用node-sass
而不是laravel-mix
。
结果表明与dart-sass
或laravel-mix
相关的某些内容不适用于包含'#'符号的路径。对于您而言,您的应用位于{{ 1}},而C:\Users\TAQI VAHEED\Desktop\#Coding\resPro
文件夹正在创建错误。
将您的应用移动到路径中没有“#”符号的其他位置,或者按照laravel-mix 4.0.0 release notes中的步骤再次启用#Coding
:
您可以手动切换回node-sass,如下所示:
node-sass
npm install node-sass