-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Build fails with SSR turned off #27
Build fails with SSR turned off #27
Comments
This is also the case for Nuxt 3 (not bridge), should that be its own issue? |
This comment has been minimized.
This comment has been minimized.
Considering this issue has been open for more than a month now without any progress on the matter, does anyone maybe know of a temporary fix that may work? |
you could turn off nitro temporary
defineNuxtConfig({
bridge: {
nitro: false
}
}) |
I also have the same error :( |
If it's already in version 3.0.0-27313139.1c88580, then it's still not working. Same error as before. |
@rodrigogs with
Repo: https://github.com/piscis/nuxt-quasar-boilerplate/tree/example/ssr-fix-testing |
Yeah, my pull request (#2191) doesn't seem to have actually fixed this issue. It's working in Nuxt's |
I think this issue should be reopened then. |
Same issue here, SSR disabled, clean Nuxt 3, please reopen |
I just wanted to confirm if this workaround works or not. We might need to generate stub server.mjs for spa mode. |
Thank you @pi0, I can help testing it if you need. Just let me know :) |
any update on this? |
Same here. Build works with |
It's not working atm |
See workaround mentioned in https://github.com/nuxt/framework/issues/886.
See a most likely related issue at https://github.com/nuxt/framework/issues/886.
I hop fixing this bug be a priority for Nuxt team. |
I hope so too. |
Currently we use Nuxt2 and Vuetify with the composition API package, since even the bridge doesn't work without SSR. Just the terminal tells me everytime, that I should migrate from the composition API package to nuxt bridge. But anyway we should wait for Vue 2.7 which is a migration release for Vue 3. Also anyway it's not needed to rush to Vue3 as soon as possible. |
You guys should check this: https://www.youtube.com/watch?v=DE3HABBzUWY&ab_channel=RazorCXTechnologies |
How does that fix building without SSR? And if you look at the roadmap vuetufy 3 beta is still missing many components |
Updating @nuxt/bridge solved this issue for me (Note: I had problems running my app locally without ssr and not building – but the error was the same). This commit on the 13. April solved it: |
I upgraded to 3.0.0-27530716.c4f8671 which should include that commit but I still get the exact same error... Am I missing something? |
New reproduction with the latest version of @nuxt/bridge (npm:@nuxt/bridge-edge@^3.0.0-27530716.c4f8671):
The problem is still there. |
Can confirm that the I made a fork with quick fix to hardcode disable SSR. This way I was able to build my app with Netlify. Delete: node_modules
Sidenote: I received another build error nitro preset was undefined after fixing the server.mjs problem. I changed the nitroconfig preset to Hope this also works for you guys🙏 |
Hello, I can confirm this is not working either for me with fresh nuxt-bridge install from today, I'm rolling back. |
I created a work a round, that makes it possible to build without using a fork: // nuxt.config.ts
import fs from 'node:fs';
import path from 'node:path';
import { defineNuxtConfig } from '@nuxt/bridge';
export default defineNuxtConfig({
hooks: {
'build:done': (builder) => {
const extraFilePath = path.join(
builder.nuxt.options.buildDir + '/dist/server',
'server.mjs'
);
fs.writeFileSync(extraFilePath, 'export {};');
}
}
}); This will put a file in the proper directory just before rollup needs it. |
I can't believe an empty file could solve this problem! |
@rvmourik your solution worked for my nuxt-bridge SPA deployed on vercel. I did then run into an error when attempting to access the app from any path that was not the root of the project - I had to install the |
Yes, that was another problem I also encountered. But that has nothing to do with the server files not being present or skipped. I managed to resolve the Related issue #345 (comment) |
At the end of
Is that normal? The static output also is useless, because it's for SSR. ( |
It seems like the generator generates a broken .js file in the
I did autoformat the file in IntelliJ and find errors like this reduceElements(t) {
const e = this.Ï€ + this.p, [n, o] = r.b.sincos(t.inc), [c, m] = r.b.sincos(t.node - this.Ï€), d = new l.a
return d.inc = Math.acos(o * this.cη+n * this.sη*
m
),
d.node = Math.atan2(n * c, this.cη*
n * m - this.sη*
o
)
+e, d.peri = Math.atan2(-this.sη*
c, n * this.cη-o * this.sη*
m
)
+t.peri, d
} With |
@MartinX3 Would you raise a new issue with a reproduction? I think there's something unique about your setup to examine. |
@danielroe I try to locate the problem. |
Environment
Linux
v14.18.0
2.16.0-27226092.034b9901
Yarn
Webpack
ssr
,buildModules
-
@nuxt/bridge@3.0.0-27234503.d5127e9
Describe the bug and expected behavior
nuxi build
fails withssr: false
. Output:Steps to reproduce
ssr: false
innuxt.config.ts
.npx
)nuxi build
in shell.Additional context
My project doesn't need SSR, but needs "runtime config" with environment variables injected by Node.js.
The text was updated successfully, but these errors were encountered: