node-lz4
node-lz4 copied to clipboard
Ubuntu 14.04 - Cannot find module '../build/Release/xxhash'
Not sure how to fix this. There were no errors on npm install. I tried node-gyp rebuild and got a host of other (presumably) unrelated errors. Using node v4.4.5 with npm 2.15.5 here and can't get lz4 going like I could on osx (fwiw).
Distributor ID: Ubuntu
Description: Ubuntu 14.04.4 LTS
Release: 14.04
Codename: trusty
"lz4": "^0.5.2",
module.js:327
throw err;
^
Error: Cannot find module '../build/Release/xxhash'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/var/app/node_modules/lz4/lib/utils.js:4:11)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/var/app/node_modules/lz4/lib/static.js:60:17)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
Humm. I just did the install on Ubuntu 14.04 with node 4.4.6 and it worked fine:
vagrant@vagrant-ubuntu-trusty-64:~/sandbox/node-lz4$ npm i npm WARN package.json [email protected] No license field.
> [email protected] install /home/vagrant/sandbox/node-lz4
> node-gyp rebuild
make: Entering directory `/home/vagrant/sandbox/node-lz4/build'
CXX(target) Release/obj.target/lz4/lib/binding/lz4_binding.o
CC(target) Release/obj.target/lz4/deps/lz4/lib/lz4.o
CC(target) Release/obj.target/lz4/deps/lz4/lib/lz4hc.o
SOLINK_MODULE(target) Release/obj.target/lz4.node
COPY Release/lz4.node
CXX(target) Release/obj.target/xxhash/lib/binding/xxhash_binding.o
CC(target) Release/obj.target/xxhash/deps/lz4/lib/xxhash.o
SOLINK_MODULE(target) Release/obj.target/xxhash.node
COPY Release/xxhash.node
make: Leaving directory `/home/vagrant/sandbox/node-lz4/build'
> [email protected] prepublish /home/vagrant/sandbox/node-lz4
> ./build.sh
vagrant@vagrant-ubuntu-trusty-64:~/sandbox/node-lz4$ ls build
binding.Makefile config.gypi lz4.js lz4.min.js lz4.target.mk Makefile Release xxhash.target.mk
vagrant@vagrant-ubuntu-trusty-64:~/sandbox/node-lz4$ ls build/Release/
lz4.node obj.target xxhash.node
vagrant@vagrant-ubuntu-trusty-64:~/sandbox/node-lz4$ node --version
v4.4.6
vagrant@vagrant-ubuntu-trusty-64:~/sandbox/node-lz4$
Having the same issue but in a total different situation - we're having a total fancy project here with [email protected]... with two entry points... one for local development, the other for proudction with full SSR on node.js.
Now when i include lz4 - and startup the dev environment.. everything is fine and webpack can bundle everything.
But as soon as i try to build and start the production env/mode - it fails with the exact same Error:
Error: Cannot find module '../build/Release/xxhash'
I totally don't understand what could cause this 😕
Upping this issue, since it's still relevant for my project as well
Getting similar error trying to use LZ4 in an angular project.
Module not found: Error: Can't resolve '../build/Release/lz4' in '../Angular-HelloWorld/node_modules/lz4/lib' ERROR in ./node_modules/lz4/lib/utils.js Module not found: Error: Can't resolve '../build/Release/xxhash' in '../Angular-HelloWorld/node_modules/lz4/lib' ERROR in ./node_modules/lz4/lib/decoder_stream.js Module not found: Error: Can't resolve 'stream' in '../Angular-HelloWorld/node_modules/lz4/lib' ERROR in ./node_modules/lz4/lib/encoder_stream.js Module not found: Error: Can't resolve 'stream' in '../Angular-HelloWorld/node_modules/lz4/lib'
Same thing on my side, but not for xxhash:
Module not found: Can't resolve '../build/Release/lz4' in '/Users/giuseppepersico/Github/perspective-test/node_modules/lz4/lib'