Can't use env variables in the package.json file

Hi,

In my ReactJS project, I am trying to use a dependency directly from a private GitHub repository. This was very helpful and I was able to use the dependency.

The problem is that I can’t use the credential using an environment variable.

npm install git+https://${GIT_TOKEN}:x-oauth-basic@github.com/user/repo.git

The ${GIT_TOKEN} is parsed as a string.

I tried to echo the value in pre:install and it worked there but not during the build.

Will I have to create my own build script/process? If yes, is there any guide or something?

Thanks

hmm, not 100% sure this is quite the right thing, but maybe start here?