kkaefer / deprecated-node-zlib Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED – Simple, synchronous deflate/inflate for node.js buffers
License: Other
DEPRECATED – Simple, synchronous deflate/inflate for node.js buffers
License: Other
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch [email protected]
for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/zlib/lib/zlib.js b/node_modules/zlib/lib/zlib.js
index bc49811..3979e92 100644
--- a/node_modules/zlib/lib/zlib.js
+++ b/node_modules/zlib/lib/zlib.js
@@ -1 +1 @@
-module.exports = require('./zlib_bindings');
+module.exports = require('zlib');
This issue body was partially generated by patch-package.
Hello,
It would be nice if node-zlib could operate on streams and inflate/deflate on the fly.
Thank you very much.
npm ERR! [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! spawn Unknown system errno 203
npm ERR!
npm ERR! Failed at the [email protected] preinstall script.
npm ERR! This is most likely a problem with the zlib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean || true; node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls zlib
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\MyPrograms\\nodejs\\node.exe" "C:\\MyPrograms\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\xxxxxxxxxx\workspace\yyyyyyyyy\src\main\server
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno Unknown system errno 203
npm
Just tried using zlib bindings and found that the path in the wscript is no longer correct for 0.6. What are your thoughts on this? Easy fix for 0.6, but will most likely break backwards compat. Since its just Python wouldn't be hard to write a quick few lines to iterate over the possible dirs and locate a match.
Hello, installing
npm install zlib
I have error
~/work/kuku/app • npm install zlib --save 19:40 dima@Dmitrys-MacBook-Pro
-
> [email protected] preinstall /Users/dima/work/kuku/app/node_modules/zlib
> node-waf clean || true; node-waf configure build
sh: node-waf: command not found
sh: node-waf: command not found
npm ERR! Darwin 14.5.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "zlib" "--save"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! [email protected] preinstall: `node-waf clean || true; node-waf configure build`
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] preinstall script 'node-waf clean || true; node-waf configure build'.
npm ERR! This is most likely a problem with the zlib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean || true; node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls zlib
npm ERR! There is likely additional logging output above.
OSx
The latest version on GitHub is 1.0.4 but the latest in NPM is 1.0.2. Can you hit publish on 1.0.4?
var zlib = require('zlib');
var Buffer = require('buffer').Buffer;
var badData = new Buffer("not compressed content");
var compressed = zlib.deflate(new Buffer("some data"));
try {
zlib.inflate(badData);
} catch (e) {
console.log('Expected error: %s', e.message);
}
try {
zlib.inflate(compressed);
} catch (e) {
console.log('Unexpected error: %s', e.message);
}
Why is this deprecated? The node.js built in is async only...
Is there any version which works with node-0.4 ?
I'm getting this error when trying to build your project – I've looked around the internet and it seems like people are using node-waf
instead. How should I proceed? Thanks!
Hi Konstantin,
I was unable to install zlib on on my RHEL environment. Console output from running 'npm install zlib' as root user is below:
[root@dhcppc36 node]# npm install zlib
npm http GET https://registry.npmjs.org/zlib
npm http 304 https://registry.npmjs.org/zlib
[email protected] install /usr/lib/node_modules/zlib
node-waf clean ; node-waf configure build
Nothing to clean (project not configured)
Setting srcdir to : /usr/lib/node_modules/zlib
Setting blddir to : /usr/lib/node_modules/zlib/build
Checking for program g++ or c++ : /usr/bin/g++
Checking for program cpp : /usr/bin/cpp
Checking for program ar : /usr/bin/ar
Checking for program ranlib : /usr/bin/ranlib
Checking for g++ : ok
Checking for node path : ok /usr/lib/node/
Checking for node prefix : ok /usr
Checking for library z : yes
'configure' finished successfully (0.096s)
Waf: Entering directory `/usr/lib/node_modules/zlib/build'
[1/2] cxx: src/node-zlib.cc -> build/Release/src/node-zlib_1.o
../src/node-zlib.cc:1:16: error: v8.h: No such file or directory
../src/node-zlib.cc:2:18: error: node.h: No such file or directory
../src/node-zlib.cc:3:25: error: node_buffer.h: No such file or directory
../src/node-zlib.cc:4:26: error: node_version.h: No such file or directory
../src/node-zlib.cc:14:26: error: missing binary operator before token "("
../src/node-zlib.cc:10: error: âv8â is not a namespace-name
../src/node-zlib.cc:10: error: expected namespace-name before â;â token
../src/node-zlib.cc:11: error: ânodeâ is not a namespace-name
../src/node-zlib.cc:11: error: expected namespace-name before â;â token
../src/node-zlib.cc:19: error: âBuffer_Dataâ declared as an âinlineâ variable
../src/node-zlib.cc:19: error: âHandleâ was not declared in this scope
../src/node-zlib.cc:19: error: âObjectâ was not declared in this scope
../src/node-zlib.cc:19: error: âobjâ was not declared in this scope
../src/node-zlib.cc:19: error: expected â,â or â;â before â{â token
../src/node-zlib.cc:22: error: âBuffer_Lengthâ declared as an âinlineâ variable
../src/node-zlib.cc:22: error: âHandleâ was not declared in this scope
../src/node-zlib.cc:22: error: âObjectâ was not declared in this scope
../src/node-zlib.cc:22: error: âobjâ was not declared in this scope
../src/node-zlib.cc:22: error: expected â,â or â;â before â{â token
../src/node-zlib.cc:25: error: expected initializer before â*â token
../src/node-zlib.cc:36: error: expected initializer before â<â token
../src/node-zlib.cc:82: error: expected constructor, destructor, or type conversion before â<âtoken
Waf: Leaving directory `/usr/lib/node_modules/zlib/build'
Build failed: -> task failed (err #1):
{task: cxx node-zlib.cc -> node-zlib_1.o}
npm ERR! [email protected] install: node-waf clean ; node-waf configure build
npm ERR! sh "-c" "node-waf clean ; node-waf configure build" failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the zlib package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-waf clean ; node-waf configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls zlib
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 2.6.32-71.el6.i686
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "zlib"
npm ERR! cwd /usr/lib/node
npm ERR! node -v v0.8.18
npm ERR! npm -v 1.2.2
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/lib/node/npm-debug.log
npm ERR! not ok code 0
I looked forward to your response.
Thanks.
I am getting error while installing anything using npm.
21783 verbose stack Error: [email protected] preinstall: node-waf clean || true; node-waf configure build
21783 verbose stack spawn ENOENT
21783 verbose stack at ChildProcess. (/usr/local/Cellar/node@6/6.16.0/lib/node_modules/npm/lib/utils/spawn.js:33:16)
21783 verbose stack at emitTwo (events.js:106:13)
21783 verbose stack at ChildProcess.emit (events.js:191:7)
21783 verbose stack at maybeClose (internal/child_process.js:920:16)
21783 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)
21784 verbose pkgid [email protected]
Because Node 0.6 will have built in zlib support, calling require("zlib")
to load this module no longer works since the built in version overrides the npm package. I use this module as a dependency to one of my own modules and will continue to do so for a little while yet for backwards compatibility reasons. However, my module is currently broken because because of the naming conflict with the built in version in 0.6 which uses a different API. It might be a good idea to rename this npm module to avoid this naming conflict. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.