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
N/A
N/A
Trying to deploy one specific function from my project should not fail
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":"[email protected]"},"requestMetadata":{"requestAttributes":{},"destinationAttributes":{}},"serviceName":"cloudfunctions.googleapis.com","methodName":"google.cloud.functions.v1.CloudFunctionsService.UpdateFunction","resourceName":"projects/actisense-dev/locations/europe-west1/functions/groupE-hiFiLoFiCalculationsHttps"}
When deploying i get the following error in my console.
``âš functions[groupE-hiFiLoFiCalculationsHttps(europe-west1)]: Deployment error.
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.```
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Is this issue still occurring?
Related 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":"[email protected]"},"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.```
I have exactly the same problem. With the same setup.
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.
Also encountering this. How do we get around it?
@MNorgren It looks like you have to provide an .npmrc file inside your functions folder.
https://cloud.google.com/functions/docs/writing/specifying-dependencies-nodejs#using_private_modules
Hello guys. I am also having this issue.
@jpinilloslr I was going crazy over this, because I didn't even knew what was wrong. I can narrow it down to a private package, but distributed via GitHub Packages. I did the instructions here https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages#authenticating-with-a-personal-access-token but I am still having the error.

And I also have my .npmrc file with the instructed lines:

And I still get the error. I event re-init the firebase project, cleaned everything that I could
Update: It looks like it's working now. Maybe the cache wasn't updated yet or something. dunno
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.
Most helpful comment
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.