Skip to content

--bundle --js-compile fails #2358

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
baocang opened this issue Mar 13, 2017 · 3 comments
Closed

--bundle --js-compile fails #2358

baocang opened this issue Mar 13, 2017 · 3 comments

Comments

@baocang
Copy link
Contributor

baocang commented Mar 13, 2017

Description

Versions & Environment

  • Polymer CLI:0.18.0-pre.13
  • node:v7.7.2
  • Chrome: Version 56.0.2924.87 (64-bit)
  • Operating System: macOS Sierra Version 10.12.3

Steps to Reproduce

  1. Create an application project: polymer init polymer-2-application
  2. Build: polymer build --bundle --js-compile
  3. Serve: polymer serve build/default
  4. Open In Chrome: http://127.0.0.1:8081

Expected Results

The application runs with display Hello xxx-app

Actual Results

Error is thrown:
(index):744 Uncaught TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function. at new DomModule ((index):798) DomModule @ (index):798
(index):12198 Uncaught TypeError: Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function. at MyApplication.PropertyAccessors ((index):1490) at MyApplication.TemplateStamp ((index):2384) at MyApplication.PropertyEffects ((index):3673) at MyApplication.PolymerElement ((index):5325) at new MyApplication ((index):12212)
screen shot 2017-03-13 at 4 59 04 pm

@FredKSchott
Copy link
Contributor

Can reproduce, but cannot reproduce with each flag separately. I believe this is related to https://github.com/Polymer/polymer-cli/issues/606

@baocang
Copy link
Contributor Author

baocang commented Mar 16, 2017

I found the solution that load webcomponents-ce-es5.js before app-shell imported, but how can i use polymer-cli do the right thing?

@FredKSchott
Copy link
Contributor

@baocang I was able to see the same thing too, see my comment in the "Can't use ES5 with v1.0.0-rc.6" issue referenced above for the current investigation. Will most likely be fixed in webcomponentsjs.

@aomarks aomarks transferred this issue from Polymer/polymer-cli Jan 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants