-
Notifications
You must be signed in to change notification settings - Fork 91
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
use dotenv with vinxi start #277
Comments
and ofc |
You can use |
@vincehi , this ticket is specifically for |
@birkskyum I have no problem loading the env var with this command for the start |
Should you work around work when using pnpm package manager (I actually am trying for
It seems that node_modules/.bin/vinxi is a shell script that node is trying to run, which obviously can't work. Any idea ? Here is my {
"name": "<project>",
"type": "module",
"scripts": {
"dev": "node --env-file=../.env ./node_modules/.bin/vinxi dev --port 8081",
"build": "vinxi build",
"start": "vinxi start --port 8081",
"version": "vinxi version",
"vinxi": "vinxi"
},
"dependencies": {
"@kobalte/core": "^0.13.7",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.14.10",
"@solidjs/start": "^1.0.9",
"archiver": "^7.0.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"fluent-ffmpeg": "^2.1.3",
"light-audio-converter": "^1.0.6",
"solid-js": "^1.9.2",
"tailwind-merge": "^2.5.4",
"tailwindcss-animate": "^1.0.7",
"vinxi": "^0.4.3"
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"@types/archiver": "^6.0.3",
"@types/fluent-ffmpeg": "^2.1.27",
"autoprefixer": "^10.4.20",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.14"
}
} |
When developing with
vinxi dev
the .env file will be loaded correctly with vite.After building and starting, none of the import.meta.env are found.
My current alternative to
vinxi start
ispnpx node-env-run .output/server/index.mjs
related:
.env
file for production / preview node preset nitrojs/nitro#1492The text was updated successfully, but these errors were encountered: