Giter Site home page Giter Site logo

Comments (12)

wmertens avatar wmertens commented on June 10, 2024

wow, weird, it should have built it into the module. I'll check soon.

from styled-vanilla-extract.

wmertens avatar wmertens commented on June 10, 2024

Ah no, the problem is in the qwik bundling :-( I fixed it by adding .qwik to the imported files but sadly there's an issue with imports by imports, see QwikDev/qwik#5367

when you read the error closely you can see that it tries to import ./node_modules/stylis, which is actually shipped with the library as you can see https://unpkg.com/browse/[email protected]/lib/

I think I might be able to work around it by bundling differently but I must be careful.

from styled-vanilla-extract.

TheAyes avatar TheAyes commented on June 10, 2024

Is there anything I can do to solve it locally? So I can start working on my project? :)

from styled-vanilla-extract.

wmertens avatar wmertens commented on June 10, 2024

@TheAyes can you try 0.5.8?

from styled-vanilla-extract.

TheAyes avatar TheAyes commented on June 10, 2024

@wmertens

$ vite --mode ssr

  VITE v4.5.0  ready in 1171 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h to show help

  ❗️ Expect significant performance loss in development.
  ❗️ Disabling the browser's cache results in waterfall requests.

  --> INITIAL STARTUP WORKS BUT THIS APPEARS AFTER REACHING OUT TO https://localhost:5173/styled-flower <--

✘ [ERROR] Could not resolve "styled-vanilla-extract/qwik"

    src/routes/styled-flower/flower.css.ts:5:36:
      5 │       import { style, styled } from "styled-vanilla-extract/qwik";
        ╵                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  The module "./lib/index.qwik.mjs" was not found on the file system:

    ../../node_modules/styled-vanilla-extract/package.json:11:16:
      11 │       "import": "./lib/index.qwik.mjs",
         ╵                 ~~~~~~~~~~~~~~~~~~~~~~

  You can mark the path "styled-vanilla-extract/qwik" as external to exclude it from the bundle,
  which will remove this error.

Build failed with 1 error:
src/routes/styled-flower/flower.css.ts:5:36: ERROR: Could not resolve "styled-vanilla-extract/qwik"
7:14:27 PM [vite] Error when evaluating SSR module /home/ayes/WebstormProjects/Calendarium/packages/Eventium/src/routes/styled-flower/index.tsx: failed to import "/src/routes/styled-flower/flower.css.ts"
|- Error: Build failed with 1 error:
src/routes/styled-flower/flower.css.ts:5:36: ERROR: Could not resolve "styled-vanilla-extract/qwik"
    at failureErrorWithLog (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:1636:15)
    at /home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:1048:25
    at runOnEndCallbacks (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:1471:45)
    at buildResponseToResult (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:1046:7)
    at /home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:1075:16
    at responseCallbacks.<computed> (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:697:9)
    at handleIncomingPacket (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:752:9)
    at Socket.readFromStdout (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:673:7)
    at Socket.emit (node:events:514:28)
    at addChunk (node:internal/streams/readable:376:12)
    at readableAddChunk (node:internal/streams/readable:349:9)
    at Readable.push (node:internal/streams/readable:286:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)

7:14:27 PM [vite] Internal server error: Build failed with 1 error:
src/routes/styled-flower/flower.css.ts:5:36: ERROR: Could not resolve "styled-vanilla-extract/qwik"
  Plugin: vanilla-extract
  File: /home/ayes/WebstormProjects/Calendarium/packages/Eventium/src/routes/styled-flower/flower.css.ts
      at failureErrorWithLog (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:1636:15)
      at /home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:1048:25
      at runOnEndCallbacks (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:1471:45)
      at buildResponseToResult (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:1046:7)
      at /home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:1075:16
      at responseCallbacks.<computed> (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:697:9)
      at handleIncomingPacket (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:752:9)
      at Socket.readFromStdout (/home/ayes/WebstormProjects/Calendarium/node_modules/@vanilla-extract/integration/node_modules/esbuild/lib/main.js:673:7)
      at Socket.emit (node:events:514:28)
      at addChunk (node:internal/streams/readable:376:12)
      at readableAddChunk (node:internal/streams/readable:349:9)
      at Readable.push (node:internal/streams/readable:286:10)
      at Pipe.onStreamRead (node:internal/stream_base_commons:190:23)
error: script "dev" exited with code 1 (SIGHUP)

Process finished with exit code 1

from styled-vanilla-extract.

wmertens avatar wmertens commented on June 10, 2024

o.5.9? 😅

from styled-vanilla-extract.

TheAyes avatar TheAyes commented on June 10, 2024

Yea, now it doesn't crash. But the preview appears to be weird. Atleast I can't see anything.
image
No Errors to report. Console stays nice and tidy

from styled-vanilla-extract.

wmertens avatar wmertens commented on June 10, 2024

No idea :-( Can you post a https://qwik.new repro?

from styled-vanilla-extract.

TheAyes avatar TheAyes commented on June 10, 2024

@wmertens Sadly it's not possible to provide an online repro using stackblitz.
While I of course could just use stackblitz with their npm package manager, using bun is important for my project and simply not using it wouldn't reflect my specific use case.
Additionally I assume the issue originates from bun in the first place, maybe with dependency resolution or the like. Since It's a quite new project I wouldn't be surprised if that was the case.

from styled-vanilla-extract.

wmertens avatar wmertens commented on June 10, 2024

In that case, can you try your project with node and see if it still happens?

from styled-vanilla-extract.

wmertens avatar wmertens commented on June 10, 2024

Ah - it's a bug in qwik 1.2.14 and up - can you try with 1.2.13? Should work.

from styled-vanilla-extract.

TheAyes avatar TheAyes commented on June 10, 2024

That indeed fixed the issue. Thanks :o
I think we can close this now ^-^

from styled-vanilla-extract.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.