-
Notifications
You must be signed in to change notification settings - Fork 956
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build failed: parsing npm version: Invalid Semantic Version; Error ID: f113d9b7
when trying to deploy functions
#5922
Comments
Hi @sceee, thanks for the report. I wasn't able to replicate the issue even though I've already used the same version of firebase-tools, npm and node. I wrote and deployed a simple 1st Gen function, updated it then redeployed again. I didn’t encounter any issues or errors while deploying the function. Are you seeing this error consistently? Would you mind sharing a sample code snippet of the 1st Gen function and the dependencies listed in your package.json file? Also, could you add --debug parameter in the deployment command you’re using and share the logs with us? |
We also have this issue, nothing has changed in our code, everything worked before and as of today we're getting this same error.
|
Just to confirm, are you trying to deploy the same function without any code changes? If so, did you see any message from the deployment logs indicating that that deployment of unchanged functions will be skipped? |
@looptheloop88 it happened for both, functions with code change and functions without code changes (but dependency updates). |
@sceee thanks for the quick response. We need additional information from you to help us with the investigation. Please share the firebase-functions version that you're using or better if you could share the dependencies in the package.json file. Also, please try to get some logs by adding --debug parameter in the command you're using for deployment. |
This error doesn't appear in the Firebase codebase, so it seems like there might be a tool that we depend on (e.g. npm) that is misconfigured. Can you provide your |
Here are some parts of the
@looptheloop88 |
Started getting exact same error about ~20 hours ago. Tried to update |
We're also seeing the same error, and are seeing it together with an error on too many concurrent builds:
|
same problem here |
Has anyone figured out a work around? We've completely lost our ability to deploy and rollback due to this issue 😵💫 |
same here
|
I thought I was the only one with this error
Is there a workaround? Using Node.js 18 with v1 functions |
Removing the |
Also seeing failing builds with cloud build. I've fixed it by pinning npm in the engines to 9.6.7. This prevents the new 9.7.0 to be used and apparently fixes the issue. |
Upstream bug: GoogleCloudPlatform/cloud-builders#922 The workaround is to update your package.json engine configuration to use a previous npm version:
|
Thank you all for the inputs. I was able to replicate the issue now. The error occurs when semantic versioning syntax is used for the npm engine in the package.json file. Specifically, if the syntax is trying to use npm version 9.7.0. "npm": "9" (failed) The npm version 9.7.0 was released last 5/31/2023, but got deprecated. So the latest and active npm version is 9.6.7. As for the workaround, remove npm under engines in package.json file or use semantic versioning syntax that will not use npm version 9.7.0. |
It works for me:
|
We can use semver's combining range to force the correct version until there's a new release "engines": {
"node": "18",
"npm": ">=9.5 <9.7"
},
|
Hey everyone! Per checking, it looks like a new version of npm was released, v9.7.1. I’ve tried out the following configurations and all seems to work properly:
With that being said, I’m going to close this issue. If anyone thinks this may be a mistake, feel free to ask this issue to be reopened. Thanks! |
[REQUIRED] Environment info
firebase-tools: v12.2.1
Platform: Ubuntu (Github actions machine Ubuntu 22.04 with npm 9.5.1)
[REQUIRED] Test case
N/A, this happens when trying to deploy functions that could previously be deployed without issues for a lot of times.
I have not seen this error before.
[REQUIRED] Steps to reproduce
Execute
firebase deploy --project=default --only functions:myFunction
[REQUIRED] Expected behavior
Existing v1 Function is updated correctly.
[REQUIRED] Actual behavior
The following output is logged:
Unfortunately, I cannot find anything when searching for this error (id), it looks more like a Git hash to me.
The text was updated successfully, but these errors were encountered: