Code Monkey home page Code Monkey logo

Comments (15)

MickL avatar MickL commented on June 5, 2024 1

So I double checked on another machine and this time I used npm. I downloaded my repo, run npm install and then npm run buld. If I check the folder .nuxt/dist/server/_nuxt I see (as I described) there is a vue file which is probably supposed to be a js file:

Bildschirmfoto 2024-02-12 um 23 31 32

nuxi info

------------------------------
- Operating System: Darwin
- Node Version:     v21.6.1
- Nuxt Version:     3.10.1
- CLI Version:      3.10.0
- Nitro Version:    2.8.1
- Package Manager:  [email protected]
- Builder:          -
- User Config:      devtools
- Runtime Modules:  -
- Build Modules:    -
------------------------------

Same issue in your Stackblitz:
Bildschirmfoto 2024-02-12 um 23 57 55

Both of the machines I tested on are Silicon Macs, the one from the other issue seems to be a Linux system.

from nuxt.

danielroe avatar danielroe commented on June 5, 2024 1

You're quite right; it is reproducible there - I was checking .output, not .nuxt.

from nuxt.

kominov avatar kominov commented on June 5, 2024 1

image
it's my issue - #25690, and you right, i have the same

from nuxt.

github-actions avatar github-actions commented on June 5, 2024

Would you be able to provide a reproduction? 🙏

More info

Why do I need to provide a reproduction?

Reproductions make it possible for us to triage and fix issues quickly with a relatively small team. It helps us discover the source of the problem, and also can reveal assumptions you or we might be making.

What will happen?

If you've provided a reproduction, we'll remove the label and try to reproduce the issue. If we can, we'll mark it as a bug and prioritize it based on its severity and how many people we think it might affect.

If needs reproduction labeled issues don't receive any substantial activity (e.g., new comments featuring a reproduction link), we'll close them. That's not because we don't care! At any point, feel free to comment with a reproduction and we'll reopen it.

How can I create a reproduction?

We have a couple of templates for starting with a minimal reproduction:

👉 https://stackblitz.com/github/nuxt/starter/tree/v3-stackblitz
👉 https://codesandbox.io/s/github/nuxt/starter/v3-codesandbox

A public GitHub repository is also perfect. 👌

Please ensure that the reproduction is as minimal as possible. See more details in our guide.

You might also find these other articles interesting and/or helpful:

from nuxt.

danielroe avatar danielroe commented on June 5, 2024

This is unlikely to be an issue with Nuxt - rollup-plugin-vue is not used by Nuxt or Nitro and is what is throwing your error.

from nuxt.

MickL avatar MickL commented on June 5, 2024

I am not 100% sure about that. Yes this plugin throws the error BUT I disabled the plugin and realized there is exactly one .vue file in the folder .nuxt/dist/server/_nuxt which is exactly the file I debugged to be the one creates the error. This is because when the nitro server is built the vue-rollup-plugin loads this file but it is not a vue SFC.

So the cause of this issue is that Nuxt creates a vue file in the .nuxt/dist/server/_nuxt folder and I guess that shouldnt be the case:

Bildschirmfoto 2024-02-10 um 01 27 44 Bildschirmfoto 2024-02-10 um 01 30 52 Bildschirmfoto 2024-02-10 um 01 35 09
  • Like above: If I delete the <script> or the <style> within the componen this file doesnt get created.
  • New discovery: If I add a new component then this one ALSO gets a vue file in the .nuxt folder

from nuxt.

danielroe avatar danielroe commented on June 5, 2024

Interesting. Have you customised assetFileNames by any chance?

from nuxt.

MickL avatar MickL commented on June 5, 2024

I did not

from nuxt.

danielroe avatar danielroe commented on June 5, 2024

I probably can't look into this without a reproduction or more info.

from nuxt.

MickL avatar MickL commented on June 5, 2024

I can try to dig more into this and make this reproducable. Atm both StackBlitz and CodeSandBox are not working tho.

from nuxt.

MickL avatar MickL commented on June 5, 2024

@danielroe So it took me a few hours of removing more and more stuff from my app until I ended in an empty app and I realized:

This happens on a blank empty app created with nuxi init and just a single index page and a single component in it:

Since StackBlitz doesnt seem to work, here is the repo: https://github.com/MickL/nuxt-bug

Bildschirmfoto 2024-02-12 um 21 52 55 Bildschirmfoto 2024-02-12 um 21 52 59

From my tryings the following needs to be true:

  • Needs to have a page (doesnt occur with app.vue)
  • Needs to have <script> with setup and lang="ts"
  • <script> needs to have something in it (can even be a comment)
  • <style> needs to have something in it (can even be a comment when adding lang="scss")

from nuxt.

danielroe avatar danielroe commented on June 5, 2024

When you say that StackBlitz doesn't work, what do you mean?

from nuxt.

danielroe avatar danielroe commented on June 5, 2024

I can't reproduce with that repo.

Here's a StackBlitz created from it - seemingly working fine: https://stackblitz.com/edit/github-iqamf7.

Could you share any more info about your setup?

from nuxt.

MickL avatar MickL commented on June 5, 2024

I used bun install then bun run build if that changes anything (which I doubt). My specs are at the very top. I think #25690 could be the same issue, he said the same:

I noticed this oddity. If I remove all the scss code from the style tag in layout, then everything starts working correctly, but if I add at least one class there, then default.css stops being generated in the production build.

will double check my repo tomorrow

from nuxt.

KresimirCosic avatar KresimirCosic commented on June 5, 2024

I am not sure if this is causing me problems now - I updated my packages to latest (all of them), and somehow I get an error:

cannot find module './stringify' (module in question is qs, which is only used by Strapi module as far as I can tell)

This only happens in dev mode, build is running fine. When I don't include the Strapi module in the configuration everything works.

If I keep use the Nuxt ^3.10.1 version I have no problems. Does any of this ring a bell?

from nuxt.

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.