I’ve been trying for weeks to get a continuous deployment to npm working. I’ve looked through countless issues, searched this forum, struggled through getting the CLI to encrypt the variable, and tried every permutation of the configuration I can think of.
I’ve tried using the CLI to encrypt the token, adding it as a global NPM_API_TOKEN environment variable and as a secure value to the api_token option of the provider. I tried so many ways to encrypt it, struggling through issues with getting the CLI to authenticate. So. many. issues.
Finally, I’m just putting the secret in through the UI as NPM_API_TOKEN.
I can’t say what’s happening, but I think something is wrong with the way the secret is injected. The logs show this:
Authenticated with API token [secure]
But from what I see in the dpl test builds and from the interpolation code in dpl, I think this should be showing something more like:
Authenticated with API token 1e**************
So, something is wrong here and I think the literal value “[secure]” is getting placed into the .npmrc file.
Here’s a recent build showing the issue: Travis CI - Test and Deploy with Confidence
I’m at my wits’ end here. Can anyone show me what I’m doing wrong?