Skip to content
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

Broken dependency: @apidevtools/json-schema-ref-parser #5450

Closed
rcb4t2 opened this issue Jan 21, 2023 · 21 comments
Closed

Broken dependency: @apidevtools/json-schema-ref-parser #5450

rcb4t2 opened this issue Jan 21, 2023 · 21 comments

Comments

@rcb4t2
Copy link

rcb4t2 commented Jan 21, 2023

The @apidevtools/json-schema-ref-parser dependency is broken, and prevents firebase-tools from being installed on Node version <17. Please note, this dependency is also being abandoned and a replacement should be found

APIDevTools/json-schema-ref-parser#298

"Suggest pinning to the exact version 9.1.0 if you haven't already, until a 9.1.2 can be released."

[REQUIRED] Environment info

firebase-tools: 11.20.0

Platform: Ubuntu

[REQUIRED] Test case

on a system using Node <17:

yarn global add firebase-tools

[REQUIRED] Steps to reproduce

On a system running Node version <17, install firebase-tools

[REQUIRED] Expected behavior

firebase-tools will be installed successfully

[REQUIRED] Actual behavior

installation fails due to broken dependency @apidevtools/json-schema-ref-parser
error @apidevtools/[email protected]: The engine "node" is incompatible with this module. Expected version ">= 17". Got "14.21.2"

@rcb4t2 rcb4t2 added the bug label Jan 21, 2023
@google-oss-bot
Copy link
Contributor

This issue does not have all the information required by the template. Looks like you forgot to fill out some sections. Please update the issue with more information.

@rcb4t2 rcb4t2 changed the title Broken dependency: Broken dependency: @apidevtools/json-schema-ref-parser Jan 21, 2023
@breakingthebuild
Copy link

Seeing the same issue error @apidevtools/[email protected]: The engine "node" is incompatible with this module. Expected version ">= 17". Got "14.20.0"

@costag1982
Copy link

I am seeing the exact same error

error @apidevtools/[email protected]: The engine "node" is incompatible with this module. Expected version ">= 17". Got "16.19.0"

this was working before not sure if an update has caused this

@filiperochs
Copy link

filiperochs commented Jan 22, 2023

I used the npm install -g firebase-tools as such from https://firebase.google.com/docs/cli and it worked for me.

@Bayaraa77
Copy link

is it resolved the error @filiperochs ?

@Bayaraa77
Copy link

i get it in my dockerfile but still not working

@filiperochs
Copy link

What is your node version?

@keehahaha
Copy link

What is your node version?

"14.21.2"

@keehahaha
Copy link

I also can not upgrade the runtime to 17 too. How can I work around it ?

@keehahaha
Copy link

I find a solution --> You can use --> yarn install --ignore-engines --> to allows package authors to state which node engines are required for the package to work.

@code-valkyrie
Copy link

code-valkyrie commented Jan 23, 2023

yarn install --ignore-engines

Worked for me! Thankyou 🙂

  • Edit: Although this solution worked, everytime a package is installed you have to pass the flag again. So, I added this to package.json to avoid passing the flag.
"resolutions": {
    "@apidevtools/json-schema-ref-parser": "9.1.0"
  }

After adding this, I deleted the yarn.lock file and did yarn install again.

@Bayaraa77
Copy link

@filiperochs my node version is 16.18.1

@kennethg-singlifeph
Copy link

keehahaha

i try this but no luck on my end node version 14.18.3

@Bayaraa77
Copy link

yarn install --ignore-engines

it is worked, thank you :)

@Psycarlo
Copy link

I get the same error

The engine "node" is incompatible with this module. Expected version ">= 17". Got "16.19.0"

Using in Github Actions

@christhompsongoogle
Copy link
Contributor

christhompsongoogle commented Jan 24, 2023

It's recommended to use npm to install firebase-tools that way we can say with certainty that using npm to install firebase-tools should be safe.

The folks who added the breaking change in the patch will need to fix it. We can technically put in a explicit dependency on an earlier version to fix it, but it's only a stop-gap

Let me know if yarn install --ignore-engines isn't a valid workaround in the meantime.

@ueda19850603
Copy link

It seems that cloud function deployment fails.

✔ functions: Finished running predeploy script.
i functions: preparing codebase default for deployment
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
i artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
✔ functions: required API cloudbuild.googleapis.com is enabled
✔ artifactregistry: required API artifactregistry.googleapis.com is enabled
✔ functions: required API cloudfunctions.googleapis.com is enabled
⚠ functions: package.json indicates an outdated version of firebase-functions. Please upgrade using npm install --save firebase-functions@latest in your functions directory.
i functions: preparing functions directory for uploading...
i functions: packaged /Users/shinyaueda/git/nipo_plus/functions (4.68 MB) for uploading
i functions: ensuring required API cloudscheduler.googleapis.com is enabled...
✔ functions: required API cloudscheduler.googleapis.com is enabled
✔ functions: functions folder uploaded successfully
i functions: updating Node.js 16 function test(us-central1)...
Build failed: yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info There appears to be trouble with your network connection. Retrying...
error @apidevtools/[email protected]: The engine "node" is incompatible with this module. Expected version ">= 17". Got "16.19.0"
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
error Found incompatible module.; Error ID: 12c8ef4a

Functions deploy had errors with the following functions:
test(us-central1)
i functions: cleaning up build files...

Error: There was an error deploying functions

@jcmosc
Copy link

jcmosc commented Jan 25, 2023

v9.1.2 of @apidevtools/json-schema-ref-parser has been released, which reverts the breaking change. You should be able to upgrade to this using normal npm version to get it working again.

@sesam
Copy link

sesam commented Jan 26, 2023

Rebuilding containers that depend on firebase-tools now works again also on the oldest LTS node version 14.

@bkendall
Copy link
Contributor

Glad they were able to publish a new package (finally) without the breaking change. Seems like this has cleared up!

@rcb4t2
Copy link
Author

rcb4t2 commented Jan 26, 2023

Thanks all! Yes they fixed the broken package

APIDevTools/json-schema-ref-parser#298 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests