jlguenego / node-expose-sspi

Expose Microsoft Windows SSPI to Node for SSO authentication.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Yarn does not resolve correct version of node-fetch - suggest removing ^ from node-fetch in package.json

beganovicazraPFG opened this issue · comments

WARNING: PLEASE READ THE DOC FOR DEBUGGING YOURSELF.

Describe the bug
This package does not work with yarn installs. The issue appears to be that yarn is not able to resolve to the correct version of node-fetch. It resolves it to 3.0.0-beta.6-exportfix instead of 3.0.0-beta.9. This in turn causes it to import fetch-blob@1.0.7 which requires node 10.

Error:

error fetch-blob@1.0.7: The engine "node" is incompatible with this module. Expected version "^10.17.0". Got "12.16.1"

To Reproduce

To reproduce this issue, import in project with yarn.

yarn add node-expose-sspi

Expected behavior
The expected behavior is that this works with the latest version of yarn 1.22.10.

Environment version:

  • yarn 1.22.10

Please give more info on your environment (and version).
node, os

From what you indicates, this seems to be a bug in yarn. The node-expose-sspi clearly requires node-fetch in version ^3.0.0-beta.9.
I use this version for correcting a previous bug (some people are required to use strange characters in their URL that node-fetch@2.6.1 do not manage correctly).

I mean yarn has the bug. Please use npm. Yarn does not have to tell to package.json how it has to work. It has to follow the rules given by npm. My documentation does not talk about yarn. Even if people thinks yarn has advantage, I see that it has also inconvenients.