Cannot deploy private packages with Node 10
See original GitHub issueVersion info node: 10.10.0 / 8.15.0 firebase-functions: 3.1.0 firebase-tools: 7.12.0
[REQUIRED] Test case N/A
[REQUIRED] Steps to reproduce Updating node 8.* to 10.* causes deployment errors. Firebase deploy seem to fail when:
i functions: updating Node.js 10 (Beta) function api(us-central1)...
i functions: updating Node.js 10 (Beta) function projector(us-central1)...
Unfortunately, an unauthorized error is given when accessing a private registry for dependencies. It seems that the .npmrc is ignored as it holds the _auth.
[REQUIRED] Expected behavior Trying to deploy should not fail. For now, I’m still using node 8.
[REQUIRED] Actual behavior
i functions: updating Node.js 10 (Beta) function projector(us-central1)...
⚠ functions[projector(us-central1)]: Deployment error.
Build failed: {"error": {"canonicalCode": "INVALID_ARGUMENT", "errorMessage": "`npm_install` had stderr output:\nwarning ../package.json: No license field\nerror An unexpected error occurred: \"https://artifactory.persgroep.cloud/artifactory/api/npm/npm/vary/-/vary-1.1.2.tgz: Request failed \\\"401 Unauthorized\\\"\".\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 1\nnpm ERR! @ preinstall: `./install-function-dependencies`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the @ preinstall script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /builder/home/.npm/_logs/2020-01-15T11_47_09_141Z-debug.log\n\nerror: `npm_install` returned code: 1", "errorType": "InternalError", "errorId": "67EE7395"}}
⚠ functions[api(us-central1)]: Deployment error.
Build failed: {"error": {"canonicalCode": "INVALID_ARGUMENT", "errorMessage": "`npm_install` had stderr output:\nwarning ../package.json: No license field\nerror An unexpected error occurred: \"https://artifactory.persgroep.cloud/artifactory/api/npm/npm/accepts/-/accepts-1.3.7.tgz: Request failed \\\"401 Unauthorized\\\"\".\nnpm ERR! code ELIFECYCLE\nnpm ERR! errno 1\nnpm ERR! @ preinstall: `./install-function-dependencies`\nnpm ERR! Exit status 1\nnpm ERR! \nnpm ERR! Failed at the @ preinstall script.\nnpm ERR! This is probably not a problem with npm. There is likely additional logging output above.\n\nnpm ERR! A complete log of this run can be found in:\nnpm ERR! /builder/home/.npm/_logs/2020-01-15T11_47_09_583Z-debug.log\n\nerror: `npm_install` returned code: 1", "errorType": "InternalError", "errorId": "1600C76E"}}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:15
- Comments:38 (3 by maintainers)
Top Results From Across the Web
Can't deploy my Loopback package on private NPM repository ...
I want to deploy a Loopback package to a private NPM repository on Gitlab, but I am getting an "Unsupported engine" error :...
Read more >Troubleshooting Node.js Deploys - Heroku Dev Center
Your Node.js deploy failed - now what? Start with these simple steps to troubleshoot a build issue. Check the buildpack.
Read more >npm Registry - JFrog - JFrog Documentation
Overview. Artifactory provides full support for managing npm packages and ensures optimal and reliable access to npmjs.org.
Read more >Use Azure Pipelines to build and publish a Node.js package
You can use an Azure DevOps pipeline to build, deploy, and test JavaScript apps. This quickstart walks through how to use a pipeline...
Read more >Specifying dependencies in Node.js - Cloud Functions
js module you have installed. You can also use the require() function to import local files you deploy alongside your function. Using private...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’ve got exactly the same issue, works fine on node 8, but node 10 deployment doesn’t seem to be using the .npmrc file
It seems the problem is still there as of today. I have a private package used by some of my functions. Functions are all using node 10. I placed a
.npmrc
infunctions
directory. It contains something like:Installing, building locally works fine. But at deploy time:
Isn’t the .npmrc of functions directory supposed to be transmitted and used while deploying?