Capt. Michael
CDCloudflare Developers
•Created by Capt. Michael on 8/13/2024 in #pages-help
How to deploy Pages project with private NPM package dependencies?
Hey fellas,
I'm trying to deploy a Next.js project with a private NPM package dependency to Pages, following https://developers.cloudflare.com/pages/how-to/npm-private-registry/#private-modules-on-the-npm-registry, I set NPM_TOKEN with an available value to both Production and Preview environment variables. But it still failed during building while deployment. Error says like "npm ERR! 404 Not Found - GET https://registry.npmjs.org/@aurora-quest/universal-authentication-types/-/universal-authentication-types-0.8.6.tgz - Not found".
This project can be built successfully on my local environment with the same NPM_TOKEN value on Cloudflare, it's weird! Could anybody share some useful experience on this? That would be very appreciated!
2 replies