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

superagent issue #752

Closed
3wweiweiwu opened this issue Jan 11, 2022 · 7 comments
Closed

superagent issue #752

3wweiweiwu opened this issue Jan 11, 2022 · 7 comments

Comments

@3wweiweiwu
Copy link

3wweiweiwu commented Jan 11, 2022

SuperAgent Version: 16.2.0
Node Version 16.3 and 12.22.7
OS: Windows

Hello,

I am not quite sure if it is a right spot to post this question. It is an issue with superagent but I don't personally use superagent. I believe it is installed as part of supertest.

As part of the pipeline to publish package to npm, I run this command to test npm
npm install --no-package-lock --no-production --engine-strict

In the latest 6.2.0 supertest, when I run this command, it is giving me following error, I try the same command in {"npm":"8.1.0","node":"16.3.0"} as well, no luck. I have to downgrade supertest to 6.1.0 to make it to work:

npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for superagent@7.0.1: wanted: {"node":">=6.4.0 !13"} (current: {"node":"12.22.7","npm":"6.14.15"})
npm ERR! notsup Not compatible with your version of node/npm: superagent@7.0.1
npm ERR! notsup Not compatible with your version of node/npm: superagent@7.0.1
npm ERR! notsup Required: {"node":">=6.4.0 !13"}
npm ERR! notsup Actual:   {"npm":"6.14.15","node":"12.22.7"}
@ekmobile
Copy link

Same problem here, I think it fails because the Node Version is not "13".

That shouldn't be the case should it? Otherwise the current "supertest" module will only work where Node 13 is installed.

@ekmobile
Copy link

You can work around it by using:

npm i --save-dev supertest@6.1.6

@korbav
Copy link

korbav commented Jan 11, 2022

>=6.4.0 !13

I'm not aware of such a syntax for defining semantic versions, the exclamation mark is suitable for architectures and operating systems restrictions, but I haven't come across anything in that sense for version definitions.
If we want to exclude node 13, the syntax should instead be 6.4.0 - 12 || >= 14

@ekmobile
Copy link

Anyways this should be a bug for superagent not for supertest, right?

@ekmobile
Copy link

It already is, so i think you can close this one: ladjs/superagent#1665

@korbav
Copy link

korbav commented Jan 11, 2022

Anyways this should be a bug for superagent not for supertest, right?

Absolutely, what is happening here is just a consequence of the loose dependency to superagent :

https://github.com/visionmedia/supertest/blob/0b035314437090f66da89fb9814135897f6aa90e/package.json#L34-L37

@niftylettuce
Copy link
Collaborator

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

4 participants