Skip to content
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

Quick Fix: Verdaccio Token CLI Warnings #1994

Closed
wants to merge 2 commits into from

Conversation

ianrohde
Copy link
Contributor

Issue

I noticed these warnings and did a quick search on Phind. One of the last recommendations was to remove the curly braces around the variable name.

When using environment variables in the .npmrc file, make sure to use the variable name without curly braces. For example, use $NPM_TOKEN instead of ${NPM_TOKEN}. stackoverflow.com

I tried it. It worked.

Details

Before Screenshot 2023-09-26 at 8 11 18 AM
After Screenshot 2023-09-26 at 8 11 57 AM

@vercel
Copy link

vercel bot commented Sep 26, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-commerce ❌ Failed (Inspect) Sep 28, 2023 0:26am
react-commerce-prod ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 28, 2023 0:26am

@federicobadini
Copy link
Contributor

If you run on Vercel purging the cache you receive a 401.
We attempted the same on another .npmrc variable: #1758
Since it was a minor I did not spent so much on it though. So maybe there is a slightly different solution that works. But I suspect that just removing the parenthesis doesn't

@ianrohde
Copy link
Contributor Author

ianrohde commented Sep 28, 2023

I don't have Vercel access to react-commerce, so pardon me if this is already in use or tested, but it looks like these are supposed to be managed through the Environment Variables UI, then called with process.env.

Next.js has built-in support for loading environment variables from .env.local into process.env.

(link)

I've tried using process.env before here, but we had to revert. It may have been due to the same 401 issue you saw. It's odd to me that using a simple variable is such an issue when it's supposed to be supported 🤷

@ianrohde ianrohde closed this Sep 28, 2023
@dhmacs dhmacs deleted the verdaccio--fix-npmrc-token-warning branch October 24, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants