pierreinglebert / node-zopfli

Node bindings for Zopfli Compression Algorithm (zlib, gzip, deflate compatible)
MIT License
110 stars 39 forks source link

Сannot find module node-v11-linux-x64/zopfli.node (irregular) #65

Open tormozz48 opened 8 years ago

tormozz48 commented 8 years ago

Hello I have some irregular issue on Ubuntu 12.04 LTS Precise: This error occurs while calling zopfli command for example:

$ find pages-* -name '_search.less.css' -o -name '_search.ru.js' | xargs zopfli -i 15
module.js:340
    throw err;
          ^
Error: Cannot find module '/place/sandbox-data/environment/node-zopfli_1.4.0/node_modules/node-zopfli/lib/binding/node-v11-linux-x64/zopfli.node'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/place/sandbox-data/environment/node-zopfli_1.4.0/node_modules/node-zopfli/lib/zopfli.js:7:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (/place/sandbox-data/environment/node-zopfli_1.4.0/node_modules/node-zopfli/bin/zopfli:8:14)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
pierreinglebert commented 8 years ago

When you say 'irregular', you mean you have it randomly ?

What's your nodejs version ? (/usr/bin/env/node -v)

tormozz48 commented 8 years ago

What's your nodejs version

v0.10.40

tormozz48 commented 8 years ago

When you say 'irregular', you mean you have it randomly

Yes, we have service with a number of hosts where node-zopfli installed. Sometimes this error occurs and break the build process

pierreinglebert commented 8 years ago

So we can assume that the file sometimes disappears (atm I don't think this is related to this module in particular) Is it a shared resource ? Is there any process that could rebuild the app at some time ? (npm i or npm rebuild)

arikon commented 8 years ago

@pierreinglebert The irregularity is not on the same machine.

We install node-zopfli in a CI environment on different build agents. And sometimes after npm install we see such an error. It could be a problem in the build logic of the node bindings.

enricostano commented 7 years ago

same issue here on Ubuntu trusty (local and CI)

node: 4.5.0
node-zopfli: ^2.0.0
yarn: 0.17.8

Any hint?

EDIT

$ ls node_modules/node-zopfli/lib/binding
node-v42-darwin-x64  node-v45-darwin-x64  node-v46-darwin-x64  node-v48-darwin-x64
sivakumar-kailasam commented 7 years ago

We could reproduce this consistently on travis on linux containers