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

Errors using Stencil built components in NextJS project #2374

Closed
kensodemann opened this issue Apr 16, 2020 · 2 comments
Closed

Errors using Stencil built components in NextJS project #2374

kensodemann opened this issue Apr 16, 2020 · 2 comments
Labels

Comments

@kensodemann
Copy link
Member

Stencil version:

 @stencil/core@1.12.4

I'm submitting a:

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:

While setting up test-projects with usage of generated react components in NextJS, we encountered two issues which should be resolved.

  1. While building the application, Stencils own bootstrapLazy is mocking document and document.head when it´s not available with an empty object. This causes console errors, because functions are still called on them.
    Automatically optimizing pages .(node:14624) UnhandledPromiseRejectionWarning: TypeError: head.querySelector is not a function
    at Object.bootstrapLazy
    The Application still runs though.
  2. The 'isCoveredByReact' function used by 'attachEventProps' is accessing 'document' without checking if it´s available by passing’s it as default parameter.

Expected behavior:
No errors thrown.

Related code:

Sample projects are pending from the user

@ionitron-bot ionitron-bot bot added the triage label Apr 16, 2020
@juanmiguelbesada
Copy link
Contributor

The second part is due react-output-target. Issue and PR here ionic-team/stencil-ds-output-targets#39

@adamdbradley
Copy link
Contributor

PR merged, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants