Comments (12)
wow, weird, it should have built it into the module. I'll check soon.
from styled-vanilla-extract.
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.
Is there anything I can do to solve it locally? So I can start working on my project? :)
from styled-vanilla-extract.
@TheAyes can you try 0.5.8?
from styled-vanilla-extract.
$ 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.
o.5.9? 😅
from styled-vanilla-extract.
Yea, now it doesn't crash. But the preview appears to be weird. Atleast I can't see anything.
No Errors to report. Console stays nice and tidy
from styled-vanilla-extract.
No idea :-( Can you post a https://qwik.new repro?
from styled-vanilla-extract.
@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.
In that case, can you try your project with node and see if it still happens?
from styled-vanilla-extract.
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.
That indeed fixed the issue. Thanks :o
I think we can close this now ^-^
from styled-vanilla-extract.
Related Issues (19)
- Support click-to-component
- HMR not working HOT 4
- vanillaExtractPlugin not working in vite.config.ts HOT 2
- variants not working when there's an extra dot in file name. HOT 1
- When using with qwik ssg, break html generation HOT 6
- css autocompletion HOT 2
- Get "QWIK WARN Duplicate implementations of "JSXNode" found" when using `styled` function. HOT 5
- `styled` doesn't show types for style objects HOT 2
- How to use styled-vanilla-extract in a qwik package? HOT 1
- Template literals & interpolation HOT 1
- Styled compoents way doesn't seem to work correctly. HOT 3
- After modifying the content of xx.css.ts , the project needs to be rebuilt to take effect. HOT 1
- npm install vite dependency issue
- Dynamic variable syntax consistency HOT 2
- unmet peer vite@^3.2.3: found 4.0.0 HOT 3
- Autocomplete Not Working HOT 2
- Styled Vanilla Extract crashes in Qwik Nx projects HOT 3
- Contribution, Local Development, and Debugging
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from styled-vanilla-extract.