Skip to content

live reload breaks webpack when using typings (in lazy loaded module) #5266

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
emreavsar opened this issue Mar 7, 2017 · 5 comments
Closed
Labels
freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix

Comments

@emreavsar
Copy link

Please provide us with the following information:

OS?

El Capitan

Versions.

@angular/cli: 1.0.0-rc.0

Repro steps.

Add typings to the project as follows:
package.json:

{
  "scripts": {
    ...
    "install": "typings install"
  }
...
  dependencies: {
...
    "typings": "^2.1.0",
...
  }
}

typings.json:

{
  "globalDependencies": {
    "typings": "github:t4deon/FHIR-STU3-TS-Typings/typings.d.ts#e36b4cf4bb07734b97ea8d14893f7747fd990438"
  }
}

src/tsconfig.app.json:

...
{
  "files": [
    "../typings/index.d.ts"
  ]
}

Then (regardless wether the typings are used in the project or not):

  1. start the app with ng serve -> 👍 works
  2. go into a lazy loaded module's code and just drop some new lines somewhere, so that livereload kicks in
  3. face the error 👎
  4. Do the same change in code inside a non lazy loaded module does not reproduce this problem.

The log given by the failure.

Failed to compile.
./src/app/home/signup/personal-gln-form/personal-gln-form.component.ts
Module build failed: Error
    at WebpackCompilerHost.populateWebpackResolver (/Users/emre/projects/eviprev-it/eviprev-dossier-frontend/node_modules/@ngtools/webpack/src/compiler_host.js:135:51)
    at _donePromise.Promise.resolve.then.then.then.then (/Users/emre/projects/eviprev-it/eviprev-dossier-frontend/node_modules/@ngtools/webpack/src/plugin.js:327:32)
    at process._tickCallback (internal/process/next_tick.js:103:7)
 @ ./src/app/home/signup/signup.module.ts 17:0-91
 @ ./src async
 @ ./~/@angular/core/src/linker/system_js_ng_module_factory_loader.js
 @ ./~/@angular/core/src/linker.js
 @ ./~/@angular/core/src/core.js
 @ ./~/@angular/core/index.js
 @ ./src/main.ts
 @ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts

Mention any other details that might be useful.

  1. I cannot use the @types npm repo, since the typings are not registered there, so I need to install by typings install
  2. Initial issue and discussions were made here: Webpack rebuild error #4326
@emreavsar
Copy link
Author

One more note:
Working with @types works, but the typings I use are not in the npm repo, search: https://microsoft.github.io/TypeSearch/)

@Darshan-popin
Copy link

Same here i'm using node v6.10.0 , @emreavsar any workarounds you have found ??

@hansl hansl removed their assignment Feb 6, 2018
@md-weber
Copy link

Could you give some feedback if this problem is still an issue?

@alan-agius4
Copy link
Collaborator

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version.

If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

@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
freq1: low Only reported by a handful of users who observe it rarely severity3: broken type: bug/fix
Projects
None yet
Development

No branches or pull requests

6 participants