artilleryio / artillery

The complete load testing platform. Everything you need for production-grade load tests. Serverless & distributed. Load test with Playwright. Load test HTTP APIs, GraphQL, WebSocket, and more. Use any Node.js module.
https://www.artillery.io
Mozilla Public License 2.0
8.04k stars 511 forks source link

Installing with Yarn requires interactive input, so that I can't use it for automatic installing #1788

Closed anselmo-coolstay closed 1 year ago

anselmo-coolstay commented 1 year ago

Version info:

Artillery: 2.0.0-28
Node.js:   v16.16.0
OS:        darwin

Running this command:

yarn install

I expected to see this happen:

Installing should be finished without any interactive input.

Instead, this happened:

When I command yarn install in my project including Artillery, it requires the version of "commons" in CLI as below:

➜ yarn install
yarn install v1.22.19
info No lockfile found.
[1/4] 🔍  Resolving packages...
warning artillery > aws-sdk > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning artillery > aws-sdk > url > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
warning artillery > @oclif/dev-cli > cli-ux@5.6.7: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
Couldn't find any versions for "commons" that matches "*"
? Please choose a version of "commons" from this list: (Use arrow keys)
warning artillery > @artilleryio/int-core > tap > coveralls > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning artillery > @artilleryio/int-core > tap > coveralls > request > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
? Please choose a version of "commons" from this list:
❯ 0.0.1-pre

This makes automatic installing difficult when I deploy my project including Artillery.

You can reproduce it with the below instructions:

➜ mkdir artillery-test
➜ cd artillery-test
➜ yarn init
➜ yarn add artillery

(Requires input while installing)

➜ yarn install

(Also requires input whenever installing it every time)

Files being used: my package.json

{
  "name": "tmp",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "artillery": "^2.0.0-28"
  }
}
aukevanleeuwen commented 1 year ago

This has been fixed in https://github.com/artilleryio/artillery/pull/1777. It's merged, but not released yet. Until then you should be able to do yarn add artillery@2.0.0-27. That version should work.

On that PR I've poked @hassy to see if we can get a release out of the door as well :-)

hassy commented 1 year ago

thank you @anselmo-coolstay! and @aukevanleeuwen for the fix :) v2.0.0-29 is out now!

anselmo-coolstay commented 1 year ago

v2.0.0-29 has the same issue for me.

giacomosimmi commented 1 year ago

I also have the same issue with v2.0.0-29.

The problem is that artillery depends on @artilleryio/int-core which in turn depends on the package commons. The package.json file of @artilleryio/int-core (here), in fact, contains the following declaration: "commons": "*"

So needs to be fixed the package @artilleryio/int-core.

hassy commented 1 year ago

this has been fixed in Artillery v2.0.0-30 (https://github.com/artilleryio/artillery/releases/tag/v2.0.0-30) Thanks everybody!

anselmo-coolstay commented 1 year ago

Thank you all.