firebase / firebase/firebase-tools
Setting Environment Variables at Deployment
- Dominant language
- TypeScript
- Stars
- 4.5k
- Forks
- 1.3k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 84
Description
I want to deploy a project with a Node module on a private registry added as a dependency.
I configured `.npmrc` following:
```
//npm.pkg.github.com/:_authToken=${NPM_TOKEN}
@scope:registry=https://npm.pkg.github.com
```
However, I cannot pass environment variables to the build process with the `firebase deploy` command.
So the authentication error has occurred in the deployment process.
The official document said, "You can set the `$NPM_TOKEN` environment variable with the `--set-build-env-vars` argument to your `gcloud functions deploy` command."
https://cloud.google.com/functions/docs/writing/specifying-dependencies-nodejs#private_modules_from_other_repositories
However, since I am using Firebase, I need to use the `firebase` command, not the `gcloud` command.
I want to pass environment variables to the build process in the `firebase deploy` command as well.
Contributor guide
Assessment
This issue has not been assessed yet.