Angular-cli: The core/ui/assets/font/**/* asset path must start with the project source root

Created on 7 May 2018  路  4Comments  路  Source: angular/angular-cli

I recently upgraded angular 4 application into angular 6 by using below link
https://update.angular.io/

It created a new file called angular.json. In our application we don't have src folder and we have multiple modules under main project directory.

under core module we have assets and configured same in assets [] in angular.json

When i do ng serve it is throwing fallowing error
The core/ui/assets/font/*/ asset path must start with the project source root

Versions

<!--
Output from: `ng --version`.

Angular CLI: 6.0.0
Node: 8.11.1
OS: win32 x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.0
@angular-devkit/build-angular     0.6.0
@angular-devkit/build-optimizer   0.6.0
@angular-devkit/core              0.6.0
@angular-devkit/schematics        0.6.0
@ngtools/webpack                  6.0.0
@schematics/angular               0.6.0
@schematics/update                0.6.0
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.6.0

  Windows (7/). 
-->

All 4 comments

I have the same problem when trying to import font-awesome fonts.

The ../node_modules/font-awesome/fonts asset path must start with the project source root.

     "assets": [
              "src/assets",
              "src/favicon.ico",
              "../node_modules/font-awesome/fonts"
            ],

When referencing files outside of the project, the long object form for asset configuration must be used. For reference please see here: https://github.com/angular/angular-cli/wiki/stories-asset-configuration

Hi ,
I configured like this

"assets": [ "container/ui/assets/font", "container/ui/assets/font/custom" ]
and it is working fine, but "container/ui/assets/font/**" won't work. I defined sub directories of font directory in assets array

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings