更新Angular 9 ---> 10后应用程序无法正常工作

时间:2020-08-07 08:17:06

标签: angular

我在编译应用程序时遇到错误。

我尝试运行ng update和其他命令,但是我发现scss文件有问题。有人知道这是怎么回事吗?

ERROR in ./src/styles.scss (./node_modules/css-loader/dist/cjs.js??ref--14-1!./node_modules/postcss-loader/src??embedded!./node_modules/resolve-url-loader??ref--14-3!./node_modules/sass-loader/dist/cjs.js??ref--14-4!./src/styles.scss)
Module Error (from ./node_modules/postcss-loader/src/index.js):
(Emitted value instead of an instance of Error) CssSyntaxError: C:\Users\I517162\Depo\gdm-depot-ng\styles.scss:3:2: Can't resolve './node_modules/@sap-theming/theming-base-content/content/Base/baseLib/sap_fiori_3/fonts/SAP-icons.woff' in 'C:\Users\I517162\Depo\gdm-depot-ng\src'

  1 | @font-face {
  2 |   font-family: 'SAP-icons';
> 3 |   src: url('node_modules/@sap-theming/theming-base-content/content/Base/baseLib/sap_fiori_3/fonts/SAP-icons.woff') format('woff');
    |  ^
  4 |   font-weight: normal;
  5 |   font-style: normal;

NonErrorEmittedError: (Emitted value instead of an instance of Error) CssSyntaxError: C:\Users\I517162\Depo\gdm-depot-ng\styles.scss:3:2: Can't resolve './node_modules/@sap-theming/theming-base-content/content/Base/baseLib/sap_fiori_3/fonts/SAP-icons.woff' in 'C:\Users\I517162\Depo\gdm-depot-ng\src'

  1 | @font-face {
  2 |   font-family: 'SAP-icons';
> 3 |   src: url('node_modules/@sap-theming/theming-base-content/content/Base/baseLib/sap_fiori_3/fonts/SAP-icons.woff') format('woff');
    |  ^
  4 |   font-weight: normal;
  5 |   font-style: normal;

    at Object.emitError (C:\Users\I517162\Depo\gdm-depot-ng\node_modules\webpack\lib\NormalModule.js:170:14)
    at C:\Users\I517162\Depo\gdm-depot-ng\node_modules\@angular-devkit\build-angular\src\angular-cli-files\plugins\postcss-cli-resources.js:140:28
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
 @ ./src/styles.scss 2:26-262
 @ multi ./src/styles.scss

0 个答案:

没有答案