Skip to content

Recompile fails when using environment configuration and ng serve -e=envName #6132

@itmayziii

Description

@itmayziii

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.0.0-rc.1
npm: 4.2.0
node: v7.4.0

Repro steps.

  1. Environment file located at src/environments/environment.dev.ts

  2. This configuration in the .angular-cli.json
    "environments": { "dev": "environments/environment.dev.ts", "prod": "environments/environment.prod.ts" }

  3. Run ng serve -e=dev

  4. Everything will compile fine the first time, go and make a small change and save one of your component files and it will fail to recompile.

You can use this repo branch as an example.
https://github.com/itmayziii/blog-ui/tree/Sjhx8HgD_contact_form/src

The log given by the failure.

Module build failed: Error: ENOENT: no such file or directory, open '/Users/txm241/Sites/blog-ui/src/environments/environment.ts'

Desired functionality.

I expect ng serve to recompile the app successfully.

Mention any other details that might be useful.

Metadata

Metadata

Assignees

Labels

needs: repro stepsWe cannot reproduce the issue with the information given

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions