Errors when using scss of theme

UI Components for Angular
Post Reply
TheTiGuR
Posts: 1
Joined: 22 Mar 2021, 15:29

21 Oct 2021, 15:27

Trying to use SCSS within the ultima theme and seem to be stuck on getting the layout to work correctly
In the styles.scss:

Code: Select all

@import "./assets/layout/css/layout-dark.scss";
This line, when added, generates errors regarding font resolution (this is coming from a download of the ultima then, npm i, add the line, and ng serve:

Code: Select all

./src/styles.scss - Error: Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleError: Module Error (from ./node_modules/postcss-loader/dist/cjs.js):
(Emitted value instead of an instance of Error) CssSyntaxError: C:\Users\me\Desktop\ultima-ng-12.0.0_clean\src\assets\sass\_fonts.scss:6:4: Can't resolve './layout/fonts/roboto-v20-latin-ext_latin-regular.woff' in 'C:\Users\me\Desktop\ultima-ng-12.0.0_clean\src'

  4 |     font-style: normal;
  5 |     font-weight: 400;
> 6 |     src: local('Roboto'), local('Roboto-Regular'),
    |    ^
  7 |     url('../../layout/fonts/roboto-v20-latin-ext_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
  8 |     url('../../layout/fonts/roboto-v20-latin-ext_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */

    at Object.emitError (C:\Users\me\Desktop\ultima-ng-12.0.0_clean\node_modules\webpack\lib\NormalModule.js:550:6)
    at Declaration (C:\Users\me\Desktop\ultima-ng-12.0.0_clean\node_modules\@angular-devkit\build-angular\src\webpack\plugins\postcss-cli-resources.js:125:28)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async LazyResult.runAsync (C:\Users\me\Desktop\ultima-ng-12.0.0_clean\node_modules\postcss\lib\lazy-result.js:405:15)
    at async Object.loader (C:\Users\me\Desktop\ultima-ng-12.0.0_clean\node_modules\postcss-loader\dist\index.js:87:14)
To add to the above, using the prebuilt css for the layout works fine, and the url paths for the fonts are identical, but the building of the scss seems to have issues with the path that it otherwise shouldn't

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 9 guests