Depoying Functions fails with the message "Build failed: {"error": {"canonicalCode": "INVALID_ARGUMENT", "errorMessage": "npm_install..."
See original GitHub issueRelated issues
[REQUIRED] Version info
node: 10.16.2 / 8.11.1
firebase-functions: 3.3.0
firebase-tools: 7.8.1 / 7.9.0
firebase-admin: 8.7.0 /8.8.0
[REQUIRED] Test case
N/A
[REQUIRED] Steps to reproduce
N/A
[REQUIRED] Expected behavior
Trying to deploy one specific function from my project should not fail
[REQUIRED] Actual behavior
Deploying one specific function from my project fails.
Tries to deploy different functions.
Tried with "engines": { "node": "8" }
and "engines": { "node": "10" }
but it failed . again.
Delete package-lock.json and reinstalled node_modules with the same result.
{"@type":"type.googleapis.com/google.cloud.audit.AuditLog","status":{"code":3,"message":"INVALID_ARGUMENT"},"authenticationInfo":{"principalEmail":"mich.tsap@gmail.com"},"requestMetadata":{"requestAttributes":{},"destinationAttributes":{}},"serviceName":"cloudfunctions.googleapis.com","methodName":"google.cloud.functions.v1.CloudFunctionsService.UpdateFunction","resourceName":"projects/actisense-dev/locations/europe-west1/functions/groupE-hiFiLoFiCalculationsHttps"}
Were you able to successfully deploy your functions?
When deploying i get the following error in my console.
Build failed: {"error": {"canonicalCode": "INVALID_ARGUMENT", "errorMessage": "`npm_install` had stderr output:\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/yargs-b279f6c4/LICENSE'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/yargs-b279f6c4/index.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@google-cloud/firestore-8f58c2ea/README.md'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@sentry/types-bc7c5fb7/dist/stackframe.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/algoliasearch-1012c148/index.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/algoliasearch-1012c148/LICENSE.txt'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@sentry/types-bc7c5fb7/dist/stacktrace.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/date-fns-1ff3f002/index.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/algoliasearch-1012c148/lite.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/algoliasearch-1012c148/reactnative.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@babel/runtime-a76c0d53/helpers/esm/AsyncGenerator.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@sentry/types-bc7c5fb7/dist/status.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/algoliasearch-1012c148/README.md'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@babel/runtime-a76c0d53/helpers/esm/asyncGeneratorDelegate.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@sentry/types-bc7c5fb7/dist/thread.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@babel/runtime-a76c0d53/helpers/esm/asyncIterator.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@sentry/types-bc7c5fb7/dist/transport.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/mongodb-291237d0/lib/async/async_iterator.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@babel/runtime-a76c0d53/helpers/esm/asyncToGenerator.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@sentry/types-bc7c5fb7/dist/user.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@types/node-f1c8db24/globals.d.ts'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@firebase/auth-1b85ce5b/dist/auth.esm.js.map'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@babel/runtime-a76c0d53/helpers/esm/awaitAsyncGenerator.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@sentry/types-bc7c5fb7/dist/wrappedfunction.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@babel/runtime-a76c0d53/helpers/esm/AwaitValue.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@sentry/types-bc7c5fb7/dist/breadcrumb.d.ts.map'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/mongodb-291237d0/lib/operations/bulk_write.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/firebase-admin-a1197e24/lib/auth/auth-api-request.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@babel/runtime-a76c0d53/helpers/esm/classCallCheck.js'\nnpm WARN tar ENOENT: no such file or directory, open '/workspace/node_modules/.staging/@sentry/types-bc7c5fb7/dist/breadcrumb.js.map'\nnpm WARN tar ENOENT: no such file or directory, open
Functions deploy had errors with the following functions:
groupE-hiFiLoFiCalculationsHttps
To try redeploying those functions, run:
firebase deploy --only functions:groupE-hiFiLoFiCalculationsHttps
To continue deploying other features (such as database), run:
firebase deploy --except functions
Error: Functions did not deploy properly.```
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:8 (2 by maintainers)
Usually this error occurred when you try to deploy a function with a custom node module which is located in a private repository and firebase cannot have access to that.
If anyone else runs into an issue like this, please contact support as this is not an issue with the
firebase-functions
SDK and we won’t be able to help much here.