zeromq.js
zeromq.js copied to clipboard
tests fail to build - possibly due to package-lock.json absence
Describe the bug
package-lock.json is not commited into the repo, and it seems it leads to some differences between installations that make tests fail (see below).
Reproducing
$ git clone https://github.com/zeromq/zeromq.js.git
$ cd zeromq.js
$ npm install
$ npm run test
> [email protected] test
> npm run build.js && mocha
> [email protected] build.js
> tsc --project tsconfig-build.json && node script/ci/downlevel-dts.js
src/compat.ts:322:35 - error TS2571: Object is of type 'unknown'.
322 if (!this._socket.closed && err.code !== "EBUSY") {
~~~
src/compat.ts:343:14 - error TS2345: Argument of type 'unknown' is not assignable to parameter of type 'Error | undefined'.
Type 'unknown' is not assignable to type 'Error'.
343 cb(err)
~~~
src/index.ts:293:28 - error TS2571: Object is of type 'unknown'.
293 if (this.closed && err.code === "EAGAIN") {
~~~
Found 3 errors.
Expected behavior
When running npm install
dependencies are exactly equal to the ones used in other developer's environments and thus tests build and execute successfully.
Tested on
- OS: Arch Linux, 5.15.13-arch1-1
- ZeroMQ.js version: 6.0.0-beta.6
- NodeJS version: v16.13.2
- NPM version: 8.1.2