#using Link or useNavigate yields "error loading dynamically imported module"

8 messages · Page 1 of 1 (latest)

raw delta
#

Using bun, all is updated.

error loading dynamically imported module: http://localhost:5173/node_modules/@builder.io/qwik-city/qwikcityprovider_component_goto_fx0bdjeja0e.js?_qrl_parent=index.qwik.mjs

here's the code

import { component$ } from "@builder.io/qwik";
import { useNavigate, Link } from "@builder.io/qwik-city";
import { styled } from "~/src/styled-system/jsx";

const Navbar = component$(() => {
    const signedIn = true;
    const nav = useNavigate();

    return (
        <Container>
            <Message onClick$={() => nav('/about')}>
                app
            </Message>
            {
                signedIn
                    ? <Menu>
                        <Link href="/about">About</Link>
                        <a href="contact">Contact</a>
                    </Menu>
                    : <Menu>
                        <a href="/login">Login</a>
                    </Menu>
            }
        </Container >
    );
});
#

the a href link works as expected, using Link or useNavigate() ripped straight from the Qwik City docs do not. I expect something configuration but i have no idea.

crimson oyster
#

Version 1.7.1?

raw delta
#

yes

#

latest bun as well

#

I figured it out. I added pandacss and in the file it generates it was importing styled from import { styled } from "~/styled-system/jsx"; instead of ~/src/styled-system/jsx

#

wasn't in the stack trace and it only showed and error when using a routing link

#

that probably makes sense with how qwik is working under the hood