Skip to content

Can't run ng serve when I want an asset to be written to a location outside the project. #8652

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

Closed
Dani2kn opened this issue Nov 27, 2017 · 2 comments

Comments

@Dani2kn
Copy link

Dani2kn commented Nov 27, 2017

Versions

Angular CLI: 1.5.4
Node: 8.9.1
OS: win32 x64
Angular: 5.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

@angular/cli: 1.5.4
@angular-devkit/build-optimizer: 0.0.33
@angular-devkit/core: 0.0.21
@angular-devkit/schematics: 0.0.37
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.4
@schematics/angular: 0.1.7
typescript: 2.4.2
webpack: 3.8.1

Repro steps

  • Step 1 - in the project folder run command ng new angular-src
  • Step 2 - modify the .angular-cli.json
"apps": [
    {
      "root": "src",
      "outDir": "../public",

and

  "assets": [
        {
          "glob": "**/*",
          "input": "./assets/",
          "output": "../public",
          "allowOutsideOutDir": true
        },
        {
          "glob": "favicon.ico",
          "input": "./",
          "output": "../public",
          "allowOutsideOutDir": true
        }

  • Step 3 - run ng serve

Observed behavior

D:\Programare\NodeJS\MeanAuthApp\angular-src>ng serve
An asset cannot be written to a location outside the project.

Desired behavior

I want to be able to run ng serve with the location outDir: "../public"

Mention any other details that might be useful (optional)

I want to achieve the same output presented in the beginning of this tutorial linked below. And hope this will help! Many thanks!

https://www.youtube.com/watch?v=zrViDpWiNVE&list=PLillGF-RfqbZMNtaOXJQiDebNXjVapWPZ&index=5

@filipesilva
Copy link
Contributor

This issue is a duplicate of #8613, fixed by #8630, which will be in the next release.

@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 7, 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