dannyfranca / qwik-router

A SPA-like router for Qwik.
MIT License
20 stars 1 forks source link

[🐞] Internal server error: Code(20) #7

Closed jahwin closed 9 months ago

jahwin commented 9 months ago

Which component is affected?

Qwik Runtime

Describe the bug

I setting qwik-router as descibed in documentation but am getting error after running and opening project url. Screenshot 2024-01-22 at 06 07 22

Reproduction

no url

Steps to reproduce

  1. create qwik app as library
  2. setup qwik-router as in documentation
  3. then run

Additional Information

I seems like there is compatibility issue with "@builder.io/qwik": "1.4.0", which am using. but am not sure

dannyfranca commented 9 months ago

@jahwin Thanks for reporting. I'll test in the latest version and try to replicate it. It has yet to be tested on Qwik 1.4.0.

dannyfranca commented 9 months ago

@jahwin, update your package to the latest; it should be fine now.

jahwin commented 9 months ago

I have tried with updated version but I got new issue: Screenshot 2024-02-04 at 12 47 00

You package is using use* outside components which is duplicated on new qwik versions

Screenshot 2024-02-04 at 12 50 23

I tried to look only on that file, am not sure if there is any other files have that issue.

dannyfranca commented 9 months ago

I have tried with updated version but I got new issue: Screenshot 2024-02-04 at 12 47 00

You package is using use* outside components which is duplicated on new qwik versions

Screenshot 2024-02-04 at 12 50 23

I tried to look only on that file, am not sure if there is any other files have that issue.

This one is expected and not an issue; you are trying to execute initRouter in a non-optimized component. I mentioned this in the documentation.

Qwik optimizations only happen in components created with the component$ factory. This is Qwik by design; it has nothing to do with the lib.

jahwin commented 9 months ago

@dannyfranca Thank you, now everything is working fine.