Skip to content

ng serve behaves inconsistently for subsequent calls #4810

@legezam

Description

@legezam

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Impacts a large percentage of users; if a workaround exists it is partial or overly painfultype: bug/fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions