Code Monkey home page Code Monkey logo

Comments (31)

kstraszewski avatar kstraszewski commented on May 28, 2024 17

After upgrading to Nuxt 3.9.3 everything is working fine for me.

from unocss.

antfu avatar antfu commented on May 28, 2024 17

Alright, hopefully vitejs/vite#15768 should fix this

from unocss.

antfu avatar antfu commented on May 28, 2024 9

Again, I would need a minimal reproduction to investigate this - saying +1 does not improve the situation, for the record. Thanks

from unocss.

dellumdeus avatar dellumdeus commented on May 28, 2024 7

Any news on this?

from unocss.

kissu avatar kissu commented on May 28, 2024 6

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.

huangyan321 avatar huangyan321 commented on May 28, 2024 5

https://stackblitz.com/edit/github-dqvhqs?file=package.json
This link provides the minimal reproduction. To reproduce the warning, please follow these steps:

  1. Wait for the Nuxt build to complete.
  2. Once the page has finished loading, click refresh once.

from unocss.

ironytr avatar ironytr commented on May 28, 2024 3

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.

cloydlau avatar cloydlau commented on May 28, 2024 2

+1, I have temporarily downgraded nuxt to version 3.8.2.

from unocss.

AndrewBogdanovTSS avatar AndrewBogdanovTSS commented on May 28, 2024 2

unocss 5.8.3
@unocss/nuxt 0.58.3
nuxt 3.9.3
vue 3.4.15
image

from unocss.

rylanharper avatar rylanharper commented on May 28, 2024 2

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:
Screenshot 2024-01-25 at 10 40 31 AM

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.

owl1n avatar owl1n commented on May 28, 2024 2

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.

serkodev avatar serkodev commented on May 28, 2024 2

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

  1. go to browser and wait for loading complete, there's no error on first load
  2. (Require this step) refresh the page once and the error shows up
reproduction.mov

from unocss.

antfu avatar antfu commented on May 28, 2024 2

It's probably introduced in vitejs/vite#14654, not yet sure how to fix it, investigating

from unocss.

serkodev avatar serkodev commented on May 28, 2024 2

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

Thank you @antfu, @bluwy 🍻

from unocss.

gigantino avatar gigantino commented on May 28, 2024 1

Putting this in my Nuxt config worked in my scenario:

export default defineConfig({
  features: {
    inlineStyles: false,
  },
})

Original answer

from unocss.

daniandl avatar daniandl commented on May 28, 2024 1

TL;DR put this in your Nuxt config:

export default defineConfig({
  features: {
    inlineStyles: false,
  },
})

Original answer

The error still appears despite this

from unocss.

hunghg255 avatar hunghg255 commented on May 28, 2024 1

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.

hunghg255 avatar hunghg255 commented on May 28, 2024 1

link

I downloaded code from stackblitz. link above

from unocss.

kissu avatar kissu commented on May 28, 2024 1

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.

serkodev avatar serkodev commented on May 28, 2024

update: after testing with the latest unocss (0.58.3), this issue is still not solved

from unocss.

gigantino avatar gigantino commented on May 28, 2024

+1, having the same issue.

from unocss.

jandobrx avatar jandobrx commented on May 28, 2024

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.

kissu avatar kissu commented on May 28, 2024

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.

owl1n avatar owl1n commented on May 28, 2024

@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.

gigantino avatar gigantino commented on May 28, 2024

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.

antfu avatar antfu commented on May 28, 2024

I can't reproduce with @serkodev's reproduction with the latest versions anymore. Can anyone provide another minimal reproductions?

from unocss.

naknakLEE avatar naknakLEE commented on May 28, 2024

+1, having the same issue.

from unocss.

re-ovo avatar re-ovo commented on May 28, 2024

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.

kissu avatar kissu commented on May 28, 2024

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.

deglier avatar deglier commented on May 28, 2024

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.

image

from unocss.

NMTuan avatar NMTuan commented on May 28, 2024

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)

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.