【发布时间】:2019-01-30 04:10:56
【问题描述】:
我正在用 sage 构建一个主题并将文件夹复制到另一个位置。之后,当我尝试构建项目时,出现此错误:
模块构建失败:ModuleBuildError:模块构建失败:UTF-8 无效 在 runLoaders (/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.asyncSassJobQueue.push [作为回调] (/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)
@multi ./scripts/main.js ./styles/main.scss
./resources/assets/styles/main.scss 中的错误
模块构建失败:ModuleBuildError:模块构建失败:UTF-8 无效 在 runLoaders (/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.asyncSassJobQueue.push [作为回调] (/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)
我认为文件的编码已经改变,有没有办法纠正这个问题?
我真的很感激任何帮助,谢谢!
【问题讨论】:
标签: wordpress webpack encoding utf-8 roots-sage