pytal / deploy-env Goto Github PK
View Code? Open in Web Editor NEWDeploy environment variables from .env and .env-cmdrc.json files to Vercel
License: MIT License
Deploy environment variables from .env and .env-cmdrc.json files to Vercel
License: MIT License
terser
Hi,
When adding a lot of env variables, I get rate limited by Vercel. However, it is currently not detected and eventually the command fails. Maybe detect & sleep for x seconds? Thanks!
Added Environment Variable NUXT_ENV_RECAPTCHA_KEY to Project umsfront [2s]
Error! Too many requests - try again in 46 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 46 seconds (more than 120, code: "api-projects"). (429)
/bin/sh: -c: line 1: syntax error: unexpected end of file
/bin/sh: -c: line 0: `echo -n (xxxxx) | vercel env add NUXT_ENV_HOME_LEGAL production'
Error! Too many requests - try again in 46 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 45 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 46 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 46 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 45 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 45 seconds (more than 120, code: "api-projects"). (429)
/bin/sh: more!: command not found
Vercel CLI 19.1.1
Error! Too many requests - try again in 44 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 43 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 43 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 43 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 43 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 43 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 43 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 43 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 41 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 41 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 41 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 41 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 41 seconds (more than 120, code: "api-projects"). (429)
/bin/sh: more!: command not found
Vercel CLI 19.1.1
Error! Too many requests - try again in 41 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 41 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 41 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 39 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 38 seconds (more than 120, code: "api-projects"). (429)
/bin/sh: More!: command not found
Vercel CLI 19.1.1
Error! Too many requests - try again in 38 seconds (more than 120, code: "api-projects"). (429)
groups.: No such file or directory
Vercel CLI 19.1.1
Error! Too many requests - try again in 38 seconds (more than 120, code: "api-projects"). (429)
Error! Too many requests - try again in 38 seconds (more than 120, code: "api-projects"). (429)
Hi,
Thanks for your package.
Using node v12.18.2, I get this error;
w@Williams-MacBook-Pro umsFront % deploy-env
internal/modules/cjs/loader.js:969
throw err;
^
Error: Cannot find module 'fs/promises'
Require stack:
I'm using a .env
file, but if a env var have spaces, deploy-env
trims them.
For example this env:
SOME_ENV=Some Important Env
Would translate to SomeImportantEnv
when using deploy-env
.
Is there a way to fix that? I've already tried using quotes, but it didn't work.
There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.
Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.
.env.[deploymentEnv]
files with dotenv
exec
promisesThanks a lot for this tool, I would like to use it with the latest vercel CLI. I am getting the following error:
Error! Environment Variable was not found.
Error! The Environment "API_URL" is invalid. It must be one of: <production | preview | development>.
Looking at the code, the issue come from a change in the vercel cli
. Older CLI has:
Vercel CLI 21.0.0
vercel env [options] <command>
add [type] [name] [environment] Add an Environment Variable (see examples below)
New CLI has:
Vercel CLI 23.0.1
vercel env [options] <command>
add [name] [environment] [gitbranch] Add an Environment Variable (see examples below)
which means [type]
has been removed ([gitbranch]
has been added).
Could you please update this project to the latest CLI version?
.env
file supportv1.1.1
Is your feature request related to a problem? Please describe.
To be able to use this cli in Github actions or other CI solutions you need to pass the --token
option with your vercel access token to the vercel
cli
Describe the solution you'd like
Add a -t
or --token
option that is forwarded to the vercel cli
Describe alternatives you've considered
Additional context
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)node
, @types/node
)@types/jest
, jest
).github/workflows/ci.yml
actions/checkout v2
pnpm/action-setup v2.4.0
actions/setup-node v2
.github/workflows/release.yml
actions/checkout v2
pnpm/action-setup v2.4.0
actions/setup-node v2
softprops/action-gh-release v1
package.json
env-cmd ^10.1.0
p-limit ^4.0.0
@types/jest ^27.5.2
@types/node ^12.20.55
@typescript-eslint/eslint-plugin ^5.59.7
@typescript-eslint/parser ^5.59.7
esbuild ^0.14.3
esbuild-jest ^0.5.0
eslint ^8.41.0
eslint-config-prettier ^8.8.0
jest ^27.5.1
prettier ^2.8.8
sucrase ^3.32.0
terser ^5.17.6
typescript ^4.9.5
vercel ^23.0.0
node >=v12.22.12
pnpm >=6.35.1
Hi, I'm having the following error while executing deploy-env production
:
(node:19829) UnhandledPromiseRejectionWarning: Error: Failed to find .rc file at default paths: [./.env-cmdrc,./.env-cmdrc.js,./.env-cmdrc.json]
at getRCFile (/home/guizz/.nvm/versions/node/v14.4.0/lib/node_modules/deploy-env/node_modules/env-cmd/dist/get-env-vars.js:108:11)
at async Object.exports.getEnvVarMap (/home/guizz/.nvm/versions/node/v14.4.0/lib/node_modules/deploy-env/lib/utils/get-env.js:1:386)
at async Object.exports.deployEnv (/home/guizz/.nvm/versions/node/v14.4.0/lib/node_modules/deploy-env/lib/utils/vercel-env.js:1:622)
Closed in dcabfc9
I use this tool on linux and it works great. I generate a .env.preview
file then run deploy-env preview
and it sets up all the vars correctly.
A co-worker uses mac, and whenever they run same command, they get a generated env file that looks correct, but after it's deployed, I get errors in the vercel log that point me to believing it's a bad env-var. I tried it on my own mac (with the same code) and it had a similar issue. it appears to be adding -n
and \n
to the var. I made an endpoint to dump the env-vars as json, and they look like this:
{
"SOME_VAR": "-n MYVALUE\n"
}
when it should be:
{
"SOME_VAR": "MYVALUE"
}
My .env.preview looks like this:
SOME_VAR=MYVALUE
Great package!
It would be great to add functionality to remove selected or all variables and to allow for multiple environments at once.
I.e.ย
deploy-env delete
or deploy-env delete [name of variable]
deploy-env --environment production preview development --var [name of variable]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.