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

Ubuntu 14.04 - Cannot find module '../build/Release/xxhash' #40

Open
ndmgrphc opened this issue Jun 23, 2016 · 5 comments
Open

Ubuntu 14.04 - Cannot find module '../build/Release/xxhash' #40

ndmgrphc opened this issue Jun 23, 2016 · 5 comments

Comments

@ndmgrphc
Copy link

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)
@pierrec
Copy link
Owner

pierrec commented Jun 27, 2016

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 lz4@0.5.2 No license field.

> lz4@0.5.2 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'

> lz4@0.5.2 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$ 

@rvetere
Copy link

rvetere commented Dec 9, 2016

Having the same issue but in a total different situation - we're having a total fancy project here with webpack@2.beta.25... 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 😕

@Rolandisimo
Copy link

Upping this issue, since it's still relevant for my project as well

@ankur-lahoti
Copy link

ankur-lahoti commented Jun 30, 2020

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'

@JosephP91
Copy link

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'

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

6 participants