-
Notifications
You must be signed in to change notification settings - Fork 24
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
nuxt 3 #107
Comments
So the issue is that in here Line 14 in 16c58d3
options.server is false on
but it is populated only on
meanwhile on nuxt bridge it is never called. I don't know why that is though, just noticed. |
Bump 👋 what's the status? Anyone here? When I try to run Nuxi Build with Bridge I get the following error: ERROR Rollup error: Could not load /Users/Username/projects/nuxt-app/.nuxt/dist/server/server.mjs (imported by node_modules/@nuxt/nitro/dist/runtime/app/render.mjs): ENOENT: no such file or directory, open '/Users/Username/projects/nuxt-app/.nuxt/dist/server/server.mjs'
FATAL Could not load /Users/Username/projects/nuxt-app/.nuxt/dist/server/server.mjs (imported by node_modules/@nuxt/nitro/dist/runtime/app/render.mjs): ENOENT: no such file or directory, open '/Users/Username/projects/nuxt-app/.nuxt/dist/server/server.mjs' |
Vite proxy is available in nuxt 3, much better, i guess https://vitejs.dev/config/#server-proxy |
So I have Vite proxy setup in nuxt 3, and its pretty much the same issue with this module in dev it works fine but in build it does not it doesn't even seem that it attempts to hit any routes |
|
Any luck with this one? |
I'm also experiencing this issue. in "dev" works fine but production wasn't . |
For a workaround until this module is updated for Nuxt 3 I am able to have proxies by creating the following file in this folder
|
Does this still work? Nowadays the server routes use the |
Try this (change the options hostname and port to your proxy) import http from 'http';
export default function (client_req, client_res) {
const options = {
hostname: 'localhost',
port: 4743,
path: client_req.url,
method: client_req.method,
headers: client_req.headers
};
const proxy = http.request(options, function (res) {
client_res.writeHead(res.statusCode, res.headers)
res.pipe(client_res, {
end: true
});
});
client_req.pipe(proxy, {
end: true
});
} |
I think there are no planned nuxt 3 support, because see on last commit — there are no activity. only if new contributors will appear |
@femanso Thanks for the example.
|
I tested |
@z3cka How did you get this to work with nuxt 3's nuxt.config.ts defineConfig object? I see errors thrown with the rewrite option after defining a target. |
I didn't. I used the project found at https://github.com/wobsoriano/nuxt-proxy#usage IIRC it did work at the time, but we've since gone with a more robust reverse proxy implemented with nginx as per our requirements. Also, the above linked project recommends looking into h3's Good luck! |
The proxy can also be configured through nitro docs in the export default defineNuxtConfig({
nitro: {
devProxy: {
"/proxy/test": "http://localhost:3001",
},
},
}); |
Will track Nuxt 3 support here: #118 Thank you for all the discussions and work arounds :) |
Hi guys,
any chance this module works with nuxt3?
In dev mode everything seems to work, but if i build the project (ssr) it stops working (getting timeouts).
The text was updated successfully, but these errors were encountered: