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

1.3.1 Failed on lower Node.js #9

Closed
XadillaX opened this issue Sep 26, 2019 · 15 comments
Closed

1.3.1 Failed on lower Node.js #9

XadillaX opened this issue Sep 26, 2019 · 15 comments

Comments

@XadillaX
Copy link

because of:

const { ZLIB_VERNUM } = ...;

I think this is a breaking change and should increase a major version.

@XadillaX XadillaX changed the title Failed on lower Node.js 1.3.1 Failed on lower Node.js Sep 26, 2019
@czy88840616
Copy link

same problem

@fengmk2
Copy link

fengmk2 commented Sep 26, 2019

#10 same

@jasonzhuang
Copy link

same

1 similar comment
@yxu2018
Copy link

yxu2018 commented Sep 26, 2019

same

@chemitaxis
Copy link

same here... :(

@molinto
Copy link

molinto commented Sep 26, 2019

Same here, please revert - cannot build :(

@molinto
Copy link

molinto commented Sep 26, 2019

npm link bcrypt

> bcrypt@3.0.6 install /usr/lib/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp ERR! UNCAUGHT EXCEPTION 
node-pre-gyp ERR! stack TypeError: Cannot match against 'undefined' or 'null'.
node-pre-gyp ERR! stack     at Object.<anonymous> (/usr/lib/node_modules/bcrypt/node_modules/minizlib/constants.js:2:40)
node-pre-gyp ERR! stack     at Module._compile (module.js:577:32)
node-pre-gyp ERR! stack     at Object.Module._extensions..js (module.js:586:10)
node-pre-gyp ERR! stack     at Module.load (module.js:494:32)
node-pre-gyp ERR! stack     at tryModuleLoad (module.js:453:12)
node-pre-gyp ERR! stack     at Function.Module._load (module.js:445:3)
node-pre-gyp ERR! stack     at Module.require (module.js:504:17)
node-pre-gyp ERR! stack     at require (internal/module.js:20:19)
node-pre-gyp ERR! stack     at Object.<anonymous> (/usr/lib/node_modules/bcrypt/node_modules/minizlib/index.js:7:39)
node-pre-gyp ERR! stack     at Module._compile (module.js:577:32)
node-pre-gyp ERR! System Linux 4.15.0-55-generic
node-pre-gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/lib/node_modules/bcrypt
node-pre-gyp ERR! node -v v6.17.1
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! This is a bug in `node-pre-gyp`.
node-pre-gyp ERR! Try to update node-pre-gyp and file an issue if it does not help:
node-pre-gyp ERR!     <https://github.com/mapbox/node-pre-gyp/issues>
npm ERR! code ELIFECYCLE
npm ERR! errno 7
npm ERR! bcrypt@3.0.6 install: `node-pre-gyp install --fallback-to-build`

@isaacs I have to use Node 6.9.5 as have hardware & cannot update.

@AliF50
Copy link

AliF50 commented Sep 26, 2019

We have the same issue on node version 6.10.0.

@himanshusinghs
Copy link

For those still looking for solution, please follow the other commits referenced above.
In our case we were using -
node: 6.10.0
npm: 3.10.10
bcrypt: 3.0.5 which required minizlib. So we added minizlib's v1.2.2 as a dependency to our package.json and things are smooth again.

There's a better approach apparently, by specifying resolutions in package.json and locking the version of minizlib to "v1.2.2" in there but we tried and it was futile.

@molinto
Copy link

molinto commented Sep 26, 2019

Hey, @himanshusinghs, just tried adding "minizlib": "1.2.2" to out package.json, but same result on Gitlab :(

Tried generating new yarn.lock file too as we use yarn install on Gitlab

@Srokap
Copy link

Srokap commented Sep 26, 2019

@molinto check _requiredBy entries in package.json of minizlib to see what requires it. Tar module seems to allow version 1.2.2 and adding it to main file as exact version worked for me.

@molinto
Copy link

molinto commented Sep 26, 2019

@himanshusinghs
Copy link

@Srokap you probably wanted to mention package-lock.json ?

@isaacs
Copy link
Owner

isaacs commented Sep 26, 2019

Fixed on 1.3.2.

@isaacs isaacs closed this as completed Sep 26, 2019
@Srokap
Copy link

Srokap commented Sep 26, 2019

@himanshusinghs I am on node 6 with bundled npm, so no package locks for me. I can check it by running:

cat node_modules/minizlib/package.json | jq '._requiredBy'

I found that tar module was requiring ^1.2.2 version which allowed to make it use older version when required at root level.

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