Using private NPM packages in with cf-pages
I'm working on a cf-pages that uses private npm packages, from it's own registry.
To have it working locally for me, by having added a personal access token from github as
NPM_AUTH_TOKEN in my .bashrc.
And the registry is set in .npmrc in the repo, so that should be fine.
But I don't know where to add the NPM_AUTH_TOKEN for the cf-pages to install and build?5 Replies
You would set it in the environment variables section https://dash.cloudflare.com/?to=/:account/pages/view/:pages-project/settings/environment-variables
But isn’t it a secret?
Yes. You would see it to a secret type under environment variables
thank you
which one? There is 2
i added to both for safe measure, but i dont understand the difference
You should only need build