alexcali
alexcali
NNuxt
Created by alexcali on 4/18/2024 in #❓・help
@nuxt/kit incompatible with node 20
Right, I tried migrating away from it but with no luck just yet. This is what I had:
modules: ["@pinia/nuxt", "nuxt-proxy"],
proxy: {
options: {
target: process.env.EXTERNAL_API_HOST,
changeOrigin: true,
pathFilter: ["/allmedia"],
},
},
modules: ["@pinia/nuxt", "nuxt-proxy"],
proxy: {
options: {
target: process.env.EXTERNAL_API_HOST,
changeOrigin: true,
pathFilter: ["/allmedia"],
},
},
This is what I currently have:
routeRules: {
"/allmedia/**": {
proxy: "https://external..host.com",
},
},
routeRules: {
"/allmedia/**": {
proxy: "https://external..host.com",
},
},
Not sure what's different, but I do get success codes in both cases - I just don't get back any json data anymore with the new method. Still investigating it on my end
9 replies
NNuxt
Created by alexcali on 4/18/2024 in #❓・help
@nuxt/kit incompatible with node 20
I did, turns out nuxt-proxy relies on it in my case! At least now I know where to look, thanks!
9 replies
NNuxt
Created by alexcali on 4/18/2024 in #❓・help
@nuxt/kit incompatible with node 20
I have a follow up question, perhaps we can chat here and then maune I can update my comments there. I see what you're saying but I am not sure why it keeps pulling that older version. What can I do to force it to pull a newer version? I've tried things like deleting my yarn.lock and node modules, using npx nuxi upgrade --force, but with no luck. Perhaps it's even a third-party library now that I think about it... 🤔
9 replies
NNuxt
Created by alexcali on 4/18/2024 in #❓・help
@nuxt/kit incompatible with node 20
I opened this issue with more context: https://github.com/nuxt/nuxt/issues/26841
9 replies
NNuxt
Created by alexcali on 6/22/2023 in #❓・help
Access environment variables from `store` or `root` folder
My idea was to use env variables within certain folders but I guess that's not possible all the time. So, I ended up re-factoring my code to follow what Nuxt reccommends.
5 replies
NNuxt
Created by alexcali on 6/22/2023 in #❓・help
Access environment variables from `store` or `root` folder
Right, I read about it here (https://nuxt.com/docs/guide/going-further/runtime-config) and it still doesn't look like I'll be able to just use process.env.VAR_NAME. I'd love to be able to just do that, alternatively I can refactor my code. This is file the store/auth.ts:
import { Auth0Client } from "@auth0/auth0-spa-js";

const auth = await new Auth0Client({
domain: "",
clientId: "",
cacheLocation: "localstorage",
authorizationParams: {
redirect_uri: "",
},
});

export default auth;
import { Auth0Client } from "@auth0/auth0-spa-js";

const auth = await new Auth0Client({
domain: "",
clientId: "",
cacheLocation: "localstorage",
authorizationParams: {
redirect_uri: "",
},
});

export default auth;
Maybe this is not the right location for it
5 replies
NNuxt
Created by Talaxasy on 5/19/2023 in #❓・help
How to use env variables inside /utils folder?
Did you find a solution to this?
3 replies