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.

An asset cannot be read from a location outside the project configuration 1.6.0

See original GitHub issue

Versions

1.6.0

Repro steps

  • Create a project
  • Configure the .angular-cli.json to Read a file from a parent folder

Observed behavior

Load file from an external folder now fails because of this check :

An asset cannot be read from a location outside the project

Introduced by the PR:

https://github.com/angular/angular-cli/commit/64c60313d7c972de870cf5af7c52efbe712e8856#diff-9eb0a75e499bdadd44d6dc62218812b8

could be possible introduce a parameter configuration as allowOutsideOutDir but for reading? something like :

 "allowOutsideReadDir": true 

It could be false by default and be enabled by the user only when he knows the security risk behind this kind of decision.

Side note the warning message could be improved indicating the assets failing

Desired behavior

Mention any other details that might be useful (optional)

If the idea above are ok for the project I could create a PR

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:23
  • Comments:7

github_iconTop GitHub Comments

3reactions
Faciuscommented, Feb 16, 2018

Same here on 1.70, worked with 1.50

  "assets": [
    {
      "glob": "**/*",
      "input": "./../../fonts/",
      "output": "./assets",
      "allowOutsideOutDir": true
    }
  ]
2reactions
dotansimhacommented, Mar 28, 2018

Same here. tried 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.7.3 😦

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 >
Hub can't open Projects! "unity is already in list. you cannot ...
2) Go into your project's file, into the assets folder, and into the scenes folder. You should see a Unity scene file. Click...
Read more >
Troubleshooting - Dashy
So from within the directory, just run docker build -t lissy93/dashy . to build, and then use docker start to run the project,...
Read more >
Fix list for IBM WebSphere Application Server Liberty
IllegalStateException: Subject is read-only from WebAppFilterManager.invokeFilters ... IllegalStateException: jstl facade bundle can not be located.
Read more >
Changelog | Addressables | 1.20.5 - Unity - Manual
Fixed issue where multiple AssetReferences could not be dragged and dropped to a ... fails where the project name or parent directory ended...
Read more >

github_iconTop Related Medium Post

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