Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The core/ui/assets/font/**/* asset path must start with the project source root #10688

Closed
Tataraovoleti opened this issue May 7, 2018 · 4 comments

Comments

@Tataraovoleti
Copy link

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/). 
-->
@ghost
Copy link

ghost commented May 7, 2018

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"
            ],

@clydin
Copy link
Member

clydin commented May 8, 2018

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

@clydin clydin closed this as completed May 8, 2018
@Tataraovoleti
Copy link
Author

Tataraovoleti commented May 9, 2018

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

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants