-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nitro Build gets stuck at "You can preview this build using node .output/server/index.mjs" and doesn't complete when using nuxt-content-assets #49
Comments
Hello, Sorry to leave you hanging! (EDIT: literally 😆) What version of Nuxt are you running (run the code below to find out) ?
If Can you confirm? See also the linked issue 169. Right now it seems a few modules are causing this, the cause is not yet known, but I suspect it's something to do with Nuxt > |
Run into this problem myself under windows. |
Hi, yes, i downgraded to 3.6.5 and it does in fact solve it! I'll be keeping an eye out on those other issues you mentioned, at the moment fixing on 3.6.5 is not problematic. And thanks again for your help! I didn't have to hang for too long 😆 I'll leave the issue open in case someone else ends up here, but feel free to close it if you think it's more appropriate! |
Whoop! Yes, let's leave it open until it – hopefully – gets solved upstream. Thanks for reporting back! |
This issue is now being tracked in the Nuxt CLI repo: |
I think I've found a temporary workaround that allows us to use the latest version of nuxt with this module
I tried adding the following to the nuxt config export default defineNuxtConfig({
hooks: {
close: (nuxt) => {
if (!nuxt.options._prepare)
process.exit()
}
}
}) Then I run |
@Hecatron that resolves the issue but is there any downside using it? |
I don't think so but I can't be 100% certain, for now it's a sort of temporary fix until nuxt sort they're end out, since I think it's not the only module it affects |
I'm not sure if related / useful but one potential downside to the workaround is I had to add an env check in order to keep Vitest working with nuxt.config.{js|ts} export default defineNuxtConfig({
hooks: {
close: (nuxt) => {
+ const isTesting = process.env.NODE_ENV === 'test'
+ if (!nuxt.options._prepare && !isTesting) {
process.exit()
}
}
}) package.json "scripts": {
+ "test": "NODE_ENV=test && vitest"
} This stops Vitest outputting nothing to the console. Also noticed this message when running Vitest.
PS absolutely adore this module thank you for making it 🙏 |
… to bug in `nuxt-content-assets`: davestewart/nuxt-content-assets#49
I'm also facing the issue of where I use with the temporary solution of "hooks" in nuxt.config.ts seems to fix for I have following versions: ├── @nuxt/content@2.12.1 |
The issue here, as explained in nuxt/cli#169 (comment), is that watchers were not being closed out. I've made a couple of changes to close watchers gracefully when Nuxt exits, as well as avoiding starting some of them in the first place when not in development mode. I hope this helps (#65). 🙏 |
Background
Using this module to serve relative images with nuxt content, runs as expected while in dev.
Issue
When running npm run build (both on server or local) with the module enabled on the nuxt.config file, the build goes all the way through until this point and then just hangs indefinitely.
removing this module from the module list in the config file seems to let the build run as normal.
Any insight would be highly appreciated!
The text was updated successfully, but these errors were encountered: