Comments (15)
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:
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:
Both of the machines I tested on are Silicon Macs, the one from the other issue seems to be a Linux system.
from nuxt.
You're quite right; it is reproducible there - I was checking .output
, not .nuxt
.
from nuxt.
it's my issue - #25690, and you right, i have the same
from nuxt.
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.
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.
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:
- 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.
Interesting. Have you customised assetFileNames
by any chance?
from nuxt.
I did not
from nuxt.
I probably can't look into this without a reproduction or more info.
from nuxt.
I can try to dig more into this and make this reproducable. Atm both StackBlitz and CodeSandBox are not working tho.
from nuxt.
@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
From my tryings the following needs to be true:
- Needs to have a page (doesnt occur with
app.vue
) - Needs to have
<script>
withsetup
andlang="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 addinglang="scss"
)
from nuxt.
When you say that StackBlitz doesn't work, what do you mean?
from nuxt.
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.
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.
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)
- Pages get duplicated when using Google Translate HOT 2
- title from defineNuxtConfig is not substituted into titleTemplate as default value if the page does not have its own title defined HOT 3
- Nitro crawlLinks option does not exclude external links which is a relative links
- nuxt3 builderio tree shaking HOT 1
- NuxtLink with external option and `/` relative URL not working HOT 2
- Better documentation and alerts for upcoming deprecations HOT 1
- PR template improvement HOT 1
- Failed to fetch dynamically imported module "/_nuxt/OpeningHours.CTqYYKGj.js" HOT 15
- FCP and LCP extremely high in nuxt HOT 6
- routeRules are undefined in production HOT 6
- The websocket service in the middleware is unable to send messages to the client. HOT 2
- Remove or fix `state` from islands components HOT 1
- Body style background image does not update when theme changes HOT 11
- Cannot navigate from one page Alias to another HOT 6
- I can't use useRuntimeConfig in async setup function (Options API) HOT 3
- WARN Cannot stringify arbitrary non-POJOs Error HOT 5
- Fine-grained config of the SSR renderer's Nitro event handler via hook
- 📚Docs: Gitlab Pages deployment guide HOT 1
- Failed to resolve component: datetime If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. at <Router> HOT 2
- nuxt3.11.1 build usefetch cannot get local data HOT 1
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 nuxt.