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 serve behaves inconsistently for subsequent calls #4810

Closed
legezam opened this issue Feb 18, 2017 · 4 comments · Fixed by #5489
Closed

ng serve behaves inconsistently for subsequent calls #4810

legezam opened this issue Feb 18, 2017 · 4 comments · Fixed by #5489
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix

Comments

@legezam
Copy link

legezam commented Feb 18, 2017

Basically i wanted to evaluate the integration of TinyMCE and Angular2 based on these tutorials:
https://www.tinymce.com/docs/integrations/angular2/
https://www.ephox.com/blog/angular-2-and-tinymce/

What i observed is:

  1. i have an application that works correctly (i am sure, i tested)
  2. run "ng serve"
  3. at webpack compile state, it fails to find tinymce module and complains. ng cli remains in watching state
  4. go to an editor, and break a binding in an angular template by mistyping something
  5. it compiles now! (weird behavior 1) - compiles, but of course, doesn't work properly in the browser
  6. go back to the editor and undo the changes
  7. the previously not compilable code compiles now and works as intended! (weird behavior 2)

OS?

Mac OSX Sierra

Versions.

@angular/cli: 1.0.0-beta.30
node: 7.4.0
os: darwin x64
@angular/common: 2.4.7
@angular/compiler: 2.4.7
@angular/core: 2.4.7
@angular/forms: 2.4.7
@angular/http: 2.4.7
@angular/platform-browser: 2.4.7
@angular/platform-browser-dynamic: 2.4.7
@angular/router: 3.4.7
@angular/cli: 1.0.0-beta.30
@angular/compiler-cli: 2.4.7

Repro steps.

Created a git repo which demonstrates the problem:
https://github.com/legezam/angular-cli-error

  1. ng serve the project (at commit 22d71dc7668bebb71a658aa22a3cd83e55841c2e - "Init")
  2. observe that webpack fails to compile with the error below. Leave it in watch mode
  3. break a binding in 'src/app/app.component.html' (8af4184cfb3a1f0881b1d3cb08fca1831a78a93c - "break it")
  4. observe that it compiles the code now and doesn't complain for missing tinymce module
  5. undo the last change and save
  6. observe that the code that was not compiling at point 1. is being compiled now. on top of that, it works perfectly. (ebe11ccc437ed1dce53443e770846c0d9be6f9d8 - "fix again")

The log given by the failure.

fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
fallbackLoader option has been deprecated - replace with "fallback"
loader option has been deprecated - replace with "use"
** NG Live Development Server is running on http://localhost:4200. **
Hash: a3537ae69e7b49a18fc7
Time: 7555ms
chunk {0} polyfills.bundle.js, polyfills.bundle.map (polyfills) 228 kB {4} [initial] [rendered]
chunk {1} main.bundle.js, main.bundle.map (main) 6.74 kB {3} [initial] [rendered]
chunk {2} styles.bundle.js, styles.bundle.map (styles) 10 kB {4} [initial] [rendered]
chunk {3} vendor.bundle.js, vendor.bundle.map (vendor) 4.08 MB [initial] [rendered]
chunk {4} inline.bundle.js, inline.bundle.map (inline) 0 bytes [entry] [rendered]

ERROR in /NgTiny/NgTiny/src/app/tiny-editor/tiny-editor.component.ts (12,21): Cannot find module 'tinymce'.)

Please help me :)
Many thanks.

@grizzm0
Copy link
Contributor

grizzm0 commented Feb 18, 2017

Please update to beta 32 and see if the error is still there.

Edit: Be sure to read the CHANGELOG for a proper update process. https://github.com/angular/angular-cli/blob/master/CHANGELOG.md

@legezam
Copy link
Author

legezam commented Feb 18, 2017

Hi

Thanks for the suggestion, unfortunately it doesn't solve the problem: 1.0.0-beta.32.3 [1.0.0-beta.30]

@filipesilva
Copy link
Contributor

Likely related to #5404.

@filipesilva filipesilva added command: build P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix labels Mar 13, 2017
@hansl hansl added this to the 1.0 Final Blocking milestone Mar 16, 2017
hansl added a commit to hansl/angular-cli that referenced this issue Mar 17, 2017
Before there was a bug that the file wasnt forced to rediagnose.

If the file changed, we wont diagnose it twice because we keep a hash table per compilation anyway.

Fixes angular#4810
Fixes angular#5404
hansl added a commit that referenced this issue Mar 17, 2017
Before there was a bug that the file wasnt forced to rediagnose.

If the file changed, we wont diagnose it twice because we keep a hash table per compilation anyway.

Fixes #4810
Fixes #5404
@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful type: bug/fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants