How to integrate with Nuxt3 #752
vanminhquangtri
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
When I migrate my app from nuxt 2 to Nuxt 3, it throws multi errors. I actually don't have any idea how to fix this. There's also no suggest on the internet, Nuxt docs page as well.
I hope to receive any advice.
This is my config folder. In nuxt 2 we don't need to create file default.json. But with Nuxt 3, without default.json, will have error Configuration property "env" is not defined.

This is my nuxt.config.ts

This is how I get the config inside component:

My start command is: cross-env NODE_ENV=production nuxt dev.
I set NODE_ENV=production but it alway return the value inside default.json, not value from production.json or dev.json or staging.json.
Beta Was this translation helpful? Give feedback.
All reactions