Comments (31)
After upgrading to Nuxt 3.9.3 everything is working fine for me.
from unocss.
Alright, hopefully vitejs/vite#15768 should fix this
from unocss.
Again, I would need a minimal reproduction to investigate this - saying +1 does not improve the situation, for the record. Thanks
from unocss.
Any news on this?
from unocss.
I do indeed have the same issue but it kinda disappears after a few refreshes? Not really consistent but not a huge blocker either. 🤔
from unocss.
https://stackblitz.com/edit/github-dqvhqs?file=package.json
This link provides the minimal reproduction. To reproduce the warning, please follow these steps:
- Wait for the Nuxt build to complete.
- Once the page has finished loading, click refresh once.
from unocss.
unocss 5.8.3
nuxt 3.9.3
vue 3.3.13
vue-router latest
Internal server error: Soft-invalidated module "/node_modules/.pnpm/[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/nuxt/dist/app/entry.js" should not have existing transform result
from unocss.
+1, I have temporarily downgraded nuxt to version 3.8.2.
from unocss.
unocss 5.8.3
@unocss/nuxt 0.58.3
nuxt 3.9.3
vue 3.4.15
from unocss.
Hmm I am still seeing the bug in the latest release, version ^0.58.4
. The issue arises during the initial startup but is resolved upon refreshing the page.. Although its hard to replicate, after that first initial issue, I can't seem to get it to reappear when I start/stop the dev sever again.
Actually I have to wait about 30sec to a min after stopping/starting the dev sever for it to reappear. Here is a screenshot from just right now:
Hmm could this have anything to do with using @unocss/transformer-directives
within a sass scoped context? I have some styling on my Nuxt components like this:
<style lang="scss" scoped>
form {
@apply flex flex-col my-6;
.container {
@apply relative w-full;
input {
@apply w-full py-2 px-3.5 mb-2.5;
@apply normal-case border border-zinc-300 rounded-md appearance-none;
}
}
}
</style>
from unocss.
Again, I would need a minimal reproduction to investigate this - saying +1 does not improve the situation, for the record. Thanks
You can use any one reproduction from above and test it like just refresh the page in browser. I think its not working on stackblitz or any sandboxes, you need start it on local environment
from unocss.
Already update the reproduction link with the latest UnoCSS version 0.58.4
and the error still shows up.
https://stackblitz.com/edit/github-xtxzaj?file=package.json
"@unocss/nuxt": "^0.58.4",
"nuxt": "^3.9.0",
"vue": "^3.4.0",
"vue-router": "^4.2.5"
Steps
- go to browser and wait for loading complete, there's no error on first load
- (Require this step) refresh the page once and the error shows up
reproduction.mov
from unocss.
It's probably introduced in vitejs/vite#14654, not yet sure how to fix it, investigating
from unocss.
Just tested and this issue should be fixed since vite v5.1.0
(nuxt v3.10.2
).
Related commits: vitejs/vite#15768, vitejs/vite#15785
from unocss.
Putting this in my Nuxt config worked in my scenario:
export default defineConfig({
features: {
inlineStyles: false,
},
})
from unocss.
TL;DR put this in your Nuxt config:
export default defineConfig({ features: { inlineStyles: false, }, })
The error still appears despite this
from unocss.
I'm not coding nuxt, but I tried debug error after I read on Twitter =)))
I recorded an error in this link, everybody can check: https://streamable.com/hvrvnw
Step:
1: npm run dev open localhost at the first browser
2: turn off npm run dev
3: remove .nuxt and node_modules/.cache
4: open 2nd browser
5: npm run dev and open localhost at 2nd browser
=> The error will appear on the first browser
from unocss.
link
I downloaded code from stackblitz. link above
from unocss.
Maybe it is also depending on the OS of the user. In my case Linux (Ubuntu) works worse than MacOS hence it's a bit tricky to reproduce properly on MacOS.
from unocss.
update: after testing with the latest unocss (0.58.3), this issue is still not solved
from unocss.
+1, having the same issue.
from unocss.
Also having this issue
I do indeed have the same issue but it kinda disappears after a few refreshes? Not really consistent but not a huge blocker either. 🤔
But this does seem to do the trick as-well no issues with my build and deployments! But big red internal server error sends gives me chills 🙃
from unocss.
Working with Netlify Edge functions locally is not always perfect (works fine on an M3 chip but less on a Linux machine for some reason) but still achievable, just need to guess that the server crashes before the functions are called and restart Netlify CLI.
from unocss.
@antfu any updates?
The error is sometimes so intrusive that it is impossible to work. Sometimes, 1-2 page refreshes helps, but sometimes 40 refreshes still with error
from unocss.
The error still appears despite this
Welp, somehow it did fix it in my specific scenario. I'm using the latest version of Nuxt if that helps.
from unocss.
I can't reproduce with @serkodev's reproduction with the latest versions anymore. Can anyone provide another minimal reproductions?
from unocss.
+1, having the same issue.
from unocss.
Under my test, I need to open F12, disable network cache, it only seems to appear on the second load, if the cache is not disabled, then it will not load the second time
For replication code, just nuxt+unocss
After some testing, it seems to be caused by import 'uno.css'
, whether it is imported automatically or manually.
from unocss.
I'm not coding nuxt, but I tried debug error after I read on Twitter =))) I recorded an error in this link, everybody can check: https://streamable.com/hvrvnw
Step: 1: npm run dev open localhost at the first browser 2: turn off npm run dev 3: remove .nuxt and node_modules/.cache 4: open 2nd browser 5: npm run dev => The error will appear on the first browser
Do you please have the link for your code? A video record is not considered a valid reproduction unfortunately. 😅
from unocss.
I have the same issue:
nuxt: 3.9.3
vue: 3.4.14
vue-router: 4.2.5
@unocs/nuxt: 0.58.3
uno presets:
[
presetUno(),
presetForms(),
presetHeadlessUi(),
presetIcons(),
presetAttributify(),
presetScrollbar(),
presetWebFonts({
provider: 'google',
fonts: {
sans: {
name: 'Roboto',
weights: [400, 500, 700],
},
},
}),
]
When I start the local server with the script: nuxt dev
and open it in the browser, the error does not occur. But when I refresh the page, the error appears and then disappears.
When I reinstall everything, including cleaning the pnpm lock file, the server becomes stable and error-free until I restart the PC.
from unocss.
I can't reproduce with @serkodev's reproduction with the latest versions anymore. Can anyone provide another minimal reproductions?
try it? https://github.com/NMTuan/nuxt_393_error
from unocss.
Related Issues (20)
- Variants doesn't work for full-advanced rules HOT 1
- ignoreAttributes doesn't disable scanning the attrs generate from component props HOT 2
- [BUG]: webpack 5 using style-loader HOT 2
- [preset-mini] Cannot read properties of undefined (reading 'split') when overriding spacing config
- 使用transformerDirectives转换器时,生成的css会在行尾多加一个分号
- 【unocss/vite】 vue-scoped 使用问题
- [Bug Report] Latest update broke styling for flexbox properties in Nuxt3 HOT 9
- fontSize theme configuration, css not compiled correctly. HOT 11
- `vue-scoped` usage issues HOT 1
- Icons Preset Node Loader does not work when using Yarn PnP HOT 5
- inspector conflicts with vite-plugin-html and cannot access /__unocss HOT 2
- `ring` inconsistency with tailwind
- wrong types/subpackage exports in 0.59.0-beta.1 HOT 8
- @unocss/preset-icons Icons are not bundled into css HOT 2
- @unocss/eslint-config doesn't work in @unocss-include HOT 1
- [VSCode extension]: Underline decoration not show for attribute if class use multiple selector before it HOT 6
- Storybook - [unocss] entry module not found, have you add `import 'uno.css'` in your main entry? HOT 2
- [preset-uno/preset-wind] Negative spacing classes don't work when defined by css variables
- [@unocss/transformer-variant-group] cannot be with vitepress HOT 1
- Add support for peer and group variants on aria-* variants
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 unocss.