Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/webpack/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress Sage主题生成错误:运行加载程序上的UTF-8无效_Wordpress_Webpack_Encoding_Utf 8_Roots Sage - Fatal编程技术网

Wordpress Sage主题生成错误:运行加载程序上的UTF-8无效

Wordpress Sage主题生成错误:运行加载程序上的UTF-8无效,wordpress,webpack,encoding,utf-8,roots-sage,Wordpress,Webpack,Encoding,Utf 8,Roots Sage,我正在用sage构建一个主题,并将文件夹复制到另一个位置。之后,当我尝试构建项目时,会出现以下错误: 模块构建失败:模块构建错误:模块构建失败:无效UTF-8 在RunLoader上(/var/www/html/plataforma/wp content/themes/template mnm/node_modules/webpack/lib/NormalModule.js:195:19) 在/var/www/html/plataforma/wp content/themes/template

我正在用sage构建一个主题,并将文件夹复制到另一个位置。之后,当我尝试构建项目时,会出现以下错误:

模块构建失败:模块构建错误:模块构建失败:无效UTF-8 在RunLoader上(/var/www/html/plataforma/wp content/themes/template mnm/node_modules/webpack/lib/NormalModule.js:195:19) 在/var/www/html/plataforma/wp content/themes/template mnm/node_modules/loader runner/lib/LoaderRunner.js:364:11 在/var/www/html/plataforma/wp content/themes/template mnm/node_modules/loader runner/lib/LoaderRunner.js:230:18 在context.callback(/var/www/html/plataforma/wp content/themes/template mnm/node_modules/loader runner/lib/LoaderRunner.js:111:13) 在Object.asyncsjsjobqueue.push[as callback](/var/www/html/plataforma/wp content/themes/template mnm/node_modules/sass loader/lib/loader.js:55:13) 反对。(/var/www/html/plataforma/wp content/themes/template mnm/node_modules/async/dist/async.js:2244:31) 在Object.callback(/var/www/html/plataforma/wp content/themes/template mnm/node_modules/async/dist/async.js:906:16) 在options.error(/var/www/html/plataforma/wp content/themes/template mnm/node_modules/node sass/lib/index.js:294:32)

@多个./scripts/main.js./style/main.scss

./resources/assets/styles/main.scss中出错

模块构建失败:模块构建错误:模块构建失败:无效UTF-8 在RunLoader上(/var/www/html/plataforma/wp content/themes/template mnm/node_modules/webpack/lib/NormalModule.js:195:19) 在/var/www/html/plataforma/wp content/themes/template mnm/node_modules/loader runner/lib/LoaderRunner.js:364:11 在/var/www/html/plataforma/wp content/themes/template mnm/node_modules/loader runner/lib/LoaderRunner.js:230:18 在context.callback(/var/www/html/plataforma/wp content/themes/template mnm/node_modules/loader runner/lib/LoaderRunner.js:111:13) 在Object.asyncsjsjobqueue.push[as callback](/var/www/html/plataforma/wp content/themes/template mnm/node_modules/sass loader/lib/loader.js:55:13) 反对。(/var/www/html/plataforma/wp content/themes/template mnm/node_modules/async/dist/async.js:2244:31) 在Object.callback(/var/www/html/plataforma/wp content/themes/template mnm/node_modules/async/dist/async.js:906:16) 在options.error(/var/www/html/plataforma/wp content/themes/template mnm/node_modules/node sass/lib/index.js:294:32)

我想文件的编码已经改变了,有没有办法解决这个问题


我真的很感激任何帮助,谢谢

所以我找到了答案,如果有人有同样的问题,我会把它贴出来。问题是main.scss中导入的一个scss文件的编码错误。 用正确的编码保存文件解决了这个问题