-1

我实际上正在将我的 Angular 项目从 NPM 迁移到 PNPM,并且我有一个奇怪的样式错误。由于我使用 PNPM 运行项目,因此无法识别样式:

角.json

            "styles": [
              "src/styles/import.scss",
              "node_modules/primeng/resources/primeng.min.css",
              "node_modules/primeicons/primeicons.css",
              "node_modules/font-awesome/css/font-awesome.min.css",
              "node_modules/flag-icon-css/css/flag-icon.min.css",
              "node_modules/ion-rangeslider/css/ion.rangeSlider.css",
              "./src/styles/ion.rangeSlider.skinFlat.css",
              "node_modules/angular2-multiselect-dropdown/themes/default.theme.css",
              "node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
              "src/styles/index.scss"
            ],

错误:

ERROR in multi ./src/styles/import.scss ./node_modules/primeng/resources/primeng.min.css ./node_modules/primeicons/primeicons.css ./node_modules/font-awesome/css/font-awesome.min.css ./node_modules/flag-icon-css/css/flag-icon.min.c
ss ./node_modules/ion-rangeslider/css/ion.rangeSlider.css ./src/styles/ion.rangeSlider.skinFlat.css ./node_modules/angular2-multiselect-dropdown/themes/default.theme.css ./node_modules/@angular/material/prebuilt-themes/indigo-pink.
css ./src/styles/index.scss
Module not found: Error: Can't resolve 'E:\Dev\UVIE\uvie-front\src\styles\ion.rangeSlider.skinFlat.css' in 'E:\Dev\UVIE\uvie-front'

提前谢谢各位!

4

1 回答 1

0

也许这是 pnpm 和 angular 或 webpack 的问题。看看这个链接

于 2021-02-15T11:11:07.590 回答