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

Dependency incompatible with node < 18 #1274

Open
Agritite opened this issue Feb 5, 2024 · 2 comments
Open

Dependency incompatible with node < 18 #1274

Agritite opened this issue Feb 5, 2024 · 2 comments

Comments

@Agritite
Copy link

Agritite commented Feb 5, 2024

Trying yarn add applicationinsights on node 14.21.3, and got

error @azure/core-auth@1.6.0: The engine "node" is incompatible with this module. Expected version ">=18.0.0". Got "14.21.3"

So I tried to resolve all incompatibilities by manually writing all dependency resolutions in package.json, and I'm stuck here:

"resolutions": {
    "applicationinsights/@azure/core-auth": "1.5.0",
    "applicationinsights/@azure/core-util": "1.2.0"
},

With these 2, now yarn add applicationinsights emits:

error @azure/core-util@1.7.0: The engine "node" is incompatible with this module. Expected version ">=18.0.0". Got "14.21.3"

which means now it's a 2nd generation dependency having compatibility issues, and I have absolutely no idea which. Also, what if there are 10 more of these incompatibilities? I find it highly impractical, so I gave up. Any ideas?

Edit:
I didn't know you can have wildcard resolutions. This works:

"resolutions": {
    "@azure/core-auth": "1.5.0",
    "@azure/core-util": "1.2.0"
},

Still, I feel like this is more of a workaround, because if README claims ApplicationInsights supports node 8 then it should work out of the box.

@jonthysell
Copy link

It's good to know, except for having to inject that into every node project.

@Agritite
Copy link
Author

@azure/core-auth claims that this is policy:

The Azure SDK libraries for JavaScript will not be guaranteed to work on Node.js versions that have reached their end of life. Dropping support for such Node.js versions may be done without increasing the major version of the Azure SDK libraries.

Which seems wierd because if this was policy from the beginning, then the Node Compatibility section shouldn't even be included in the README because it could be invalidated at anytime even if this package hasn't bumped its version at all, such as now.

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

No branches or pull requests

2 participants