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

ng build with absolute outputPath outputs index.html in wrong location #14474

Closed
bgotink opened this issue May 20, 2019 · 1 comment · Fixed by #14478
Closed

ng build with absolute outputPath outputs index.html in wrong location #14474

bgotink opened this issue May 20, 2019 · 1 comment · Fixed by #14478
Assignees
Labels
Milestone

Comments

@bgotink
Copy link
Contributor

bgotink commented May 20, 2019

🐞 Bug report

Command (mark with an x)

- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Is this a regression?

Yes, version 7 doesn't have this issue

Description

Running

ng build --outputPath /tmp/dist

outputs the assets in /tmp/dist while the index.html is written to ./tmp/dist.

🔬 Minimal Reproduction

$ cd /tmp
$ npx --package @angular/[email protected] ng new foo --prefix foo
$ cd foo
$ yarn ng build --outputPath /tmp/foo-dist
$ ls 
README.md  angular.json  browserslist  e2e  karma.conf.js  node_modules  package.json  src  tmp  tsconfig.app.json  tsconfig.json  tsconfig.spec.json  tslint.json  yarn.lock
$ find tmp
tmp
tmp/foo-dist
tmp/foo-dist/index.html
$ find /tmp/foo-dist
/tmp/foo-dist
/tmp/foo-dist/main-es2015.js
/tmp/foo-dist/runtime-es2015.js
/tmp/foo-dist/vendor-es5.js
/tmp/foo-dist/favicon.ico
/tmp/foo-dist/styles-es2015.js.map
/tmp/foo-dist/vendor-es2015.js
/tmp/foo-dist/styles-es5.js.map
/tmp/foo-dist/runtime-es5.js
/tmp/foo-dist/styles-es2015.js
/tmp/foo-dist/polyfills-es2015.js.map
/tmp/foo-dist/main-es2015.js.map
/tmp/foo-dist/polyfills-es2015.js
/tmp/foo-dist/vendor-es2015.js.map
/tmp/foo-dist/styles-es5.js
/tmp/foo-dist/polyfills-es5.js.map
/tmp/foo-dist/polyfills-es5.js
/tmp/foo-dist/vendor-es5.js.map
/tmp/foo-dist/runtime-es5.js.map
/tmp/foo-dist/main-es5.js
/tmp/foo-dist/runtime-es2015.js.map
/tmp/foo-dist/main-es5.js.map

🔥 Exception or Error

Unable to serve the built app

🌍 Your Environment



     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 8.0.0-rc.4
Node: 10.15.3
OS: darwin x64
Angular: 8.0.0-rc.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.0-rc.4
@angular-devkit/build-angular     0.800.0-rc.4
@angular-devkit/build-optimizer   0.800.0-rc.4
@angular-devkit/build-webpack     0.800.0-rc.4
@angular-devkit/core              8.0.0-rc.4
@angular-devkit/schematics        8.0.0-rc.4
@ngtools/webpack                  8.0.0-rc.4
@schematics/angular               8.0.0-rc.4
@schematics/update                0.800.0-rc.4
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0
    

Anything else relevant?

Verified on a UNIX system, I don't know if this issue exists on Windows.

@alan-agius4 alan-agius4 added this to the 8.0 milestone May 20, 2019
@ngbot ngbot bot removed this from the 8.0 milestone May 20, 2019
@alan-agius4 alan-agius4 added area: @angular-devkit/build-angular freq1: low Only reported by a handful of users who observe it rarely severity5: regression labels May 20, 2019
@ngbot ngbot bot added this to the needsTriage milestone May 20, 2019
@ngbot ngbot bot modified the milestones: needsTriage, Backlog May 20, 2019
@alan-agius4 alan-agius4 modified the milestones: Backlog, 8.0 May 20, 2019
@alan-agius4 alan-agius4 self-assigned this May 20, 2019
mgechev pushed a commit that referenced this issue May 21, 2019
mgechev pushed a commit that referenced this issue May 21, 2019
@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 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants