Closed alextes closed 5 years ago
Hi, this is a problem with nan not updated to latest which is required to be compiled with Node10.
After force installing latest nan
, you will face the problem of some header file not found, this is because the new npm won't do submodule update
anymore.
I've tried a dirty hack by copying the whole zopfli code to the repo and it can be installed normally.
I will create PR for this fix and hope the owner will have sometime to merge it.
take back the submodule thing, in fact we just need to force it to build again then it should work:
in package.json's scripts
, change:
"install": "node-pre-gyp install --fallback-to-build",
to
"install": "node-pre-gyp install --build-from-source",
and it should work
you can try it out here
@chinhnguyen do you have your updated package published anywhere?
I'm afraid not, currently I'm pointing directly to my own fork.
Just hit that issue as well under Windows 8.1 + MSYS2.
It is apparently caused by a behavior change in node 10 (issue #21063), which was addressed recently in node-pre-gyp
(issue #391), which is used to build node-zopfli
.
To fix this issue one can alter node-zopfli
's package.json
to upgrade node-pre-gyp
to v0.12:
. . . . . . . . .
"dependencies": {
. . . . . . . . .
"node-pre-gyp": "^0.12.0"
},
. . . . . . . . .
After that change running npm install
should succeed (did for me).
Awesome! Thanks!
Woo thanks @geonanorch you helpful Windows 8 user 😂
fixed in the new published v2.0.3
node: v10.9.0 node-gyp: v3.7.0
Works fine with node 8 and 9.
Some of the people in #87 might actually be experiencing this issue instead.