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

Builds break when using router elements in multiple components #86

Closed
1 of 3 tasks
snaptopixel opened this issue Jan 14, 2019 · 2 comments
Closed
1 of 3 tasks

Builds break when using router elements in multiple components #86

snaptopixel opened this issue Jan 14, 2019 · 2 comments
Assignees

Comments

@snaptopixel
Copy link

Stencil version: (run npm list @stencil/core from a terminal/cmd prompt and paste output below):

@stencil/core@0.16.2

I'm submitting a ... (check one with "x")

Current behavior:
Using stencil-route-link and/or stencil-route in multiple components will break your production build:

[ ERROR ]  TypeError: Cannot read property 'toString' of undefined at e.getRenderedHash
           (@stencil/core/dist/sys/node/index.js:1:324262) at
           @stencil/core/dist/sys/node/index.js:1:325017 at
           e.visitDependencies (@stencil/core/dist/sys/node/index.js:1:324643)
           at e.computeContentHashWithDependencies
           (@stencil/core/dist/sys/node/index.js:1:324921) at
           @stencil/core/dist/sys/node/index.js:1:329531 at
           @stencil/core/dist/sys/node/index.js:1:313503 at String.replace
           (<anonymous>) at renderNamePattern
           (@stencil/core/dist/sys/node/index.js:1:313462) at e.generateId
           (@stencil/core/dist/sys/node/index.js:1:329417) at assignChunkIds
           (@stencil/core/dist/sys/node/index.js:1:455624)

Expected behavior:
You can sprinkle stencil-route components throughout your app and do a prod build with no issues.

Steps to reproduce:

  • npm init stencil
  • cd into project dir
  • npm run-script build
  • 💥

Related code:
If you edit the newly created project's app-home.tsx and remove the stencil-route-link it will build again.

insert any relevant code here

Other information:
This is the source of the following issue in core: ionic-team/stencil#1313

@jthoms1 jthoms1 self-assigned this Jan 14, 2019
@MattMcFarland
Copy link

MattMcFarland commented Jan 15, 2019

I personally ran into this issue a well, just using the stencil router. I think an older version of the router works but just not the latest. also maybe its not related, but I can't use state-tunnel with a newer version of the router either.

@simonhaenisch
Copy link

This is pretty much the same as ionic-team/stencil#1306 which was a Stencil issue (actually an upstream issue with Rollup) that should be fixed in 0.17.0-0 (npm install @stencil/core@next), if you want to try it out.

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

No branches or pull requests

4 participants