question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

allowOutsideOutDir for assets not working again

See original GitHub issue

Versions

Tested on:
1.6.3
1.6.5
Windows 10

Repro steps

  • npm install -G @angular/cli

  • cd to project with assets that need to be copied outside the project folder. From the .angular-cli.json: “assets”: [{ “input”: “./assets/”, “glob”: “**/*”, “output”: “…/EcView/WebContent/assets”, “allowOutsideOutDir”: true }],

  • ng build

Observed behavior

Build failed:

>ng build
An asset cannot be written to a location outside the project.

Desired behavior

The build process copies the assets to the specified folder and completes the compilation of source code.

Other details

Seems similar to, possible regression of https://github.com/angular/angular-cli/issues/8613

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
yuvalblcommented, Apr 23, 2018

Angular version: 6.0.0-rc.5 Angular-CLI version: 6.0.0-rc.5

I’ve created a new project and was able to build to a directory outside the project root, with no allowOutsideOutDir flag

side-note: If I get it correctly, .angular-cli.json configuration is now included in angular.json.

Repro steps:

  1. create new project.
  2. in angular.json change outputPath to: '../MyDir'
  3. run ng build
  4. see build output outside the project root directory

Related to #9686 seems like this commit is the problem

0reactions
angular-automatic-lock-bot[bot]commented, Sep 8, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An asset cannot be read from a location outside the project
I am having a requirement to read a file from a specific location which is outside of the angular project folder. I tried...
Read more >
angular/angular-cli - Gitter
Hi everyone! Does anyone know how robust would be to run the "client" and "server" builds required for Universal support concurrently?
Read more >
Assets folder does not appear for Fusion Team members and ...
Issue : For some Fusion Team members, the assets folder will not appear and no Cloud Libraries appear when accessing the tool library....
Read more >
Images not loading from assets folder in Angular
Angular resolves this problem for you, and in a component, you have to only add a path to the assets folder, instead of...
Read more >
Importing Assets - Unity - Manual
Your mesh file does not need to have an animation to be imported. ... will cause Unity to re-import the asset again to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found