Skip to content
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

/contact.html #59

Open
utterances-bot opened this issue Jan 10, 2023 · 3 comments
Open

/contact.html #59

utterances-bot opened this issue Jan 10, 2023 · 3 comments

Comments

@utterances-bot
Copy link

Cody Bontecou | Cody Bontecou

A VitePress site

https://codybontecou.com/contact.html

Copy link

Your article was really helpful just need one more help I am using Nuxt3 and want to create multiple environment file I install dotenv package and created .env.development and set
//nuxt.config.ts
import dotenv from 'dotenv'
dotenv.config({ path: .env.${process.env.NODE_ENV} })

but now it says ERROR Cannot start nuxt: Unable to obtain an available random port number! can you help

I tried setting environment file from package.json nothing work nor found any article on it. .env files are in gitignore file that is we didn't add it in repo

@CodyBontecou
Copy link
Owner

Hey @prashantnirgun, you'll probably want to use Nuxt's runtimeConfig.

Check out https://nuxtjs.org/tutorials/moving-from-nuxtjs-dotenv-to-runtime-config/.

@prashantnirgun
Copy link

Thanks for your reply I already go through this article. It shows you to create env variables or default value to variables. My Issue is I possibly have 3 values for development, staging and production. I can't even hard code that value in nuxt.config.ts. That is missing I tried dotenv @nuxt/dotenv they are for the same purpose but unfortunately they are not compatible for nuxt3 latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants