node-zopfli icon indicating copy to clipboard operation
node-zopfli copied to clipboard

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

Open tormozz48 opened this issue 9 years ago • 7 comments

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)

tormozz48 avatar Feb 04 '16 09:02 tormozz48

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

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

pierreinglebert avatar Feb 04 '16 13:02 pierreinglebert

What's your nodejs version

v0.10.40

tormozz48 avatar Feb 04 '16 14:02 tormozz48

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

tormozz48 avatar Feb 04 '16 14:02 tormozz48

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)

pierreinglebert avatar Feb 04 '16 16:02 pierreinglebert

@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.

arikon avatar Feb 05 '16 09:02 arikon

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

enricostano avatar Nov 28 '16 15:11 enricostano

We could reproduce this consistently on travis on linux containers

sivakumar-kailasam avatar Mar 22 '17 01:03 sivakumar-kailasam