regular / unbzip2-stream

streaming unbzip2 implementatio in pure javascript for node and browsers
Other
29 stars 23 forks source link

Cannot find module './lib/bzip2' #15

Closed larsthorup closed 7 years ago

larsthorup commented 7 years ago

I am getting this error:

Error: Cannot find module './lib/bzip2' at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at Object. (C:\r\triggerz\triggerz\node_modules\unbzip2-stream\index.js:2:11) at Module._compile (module.js:571:32) at Object.Module._extensions..js (module.js:580:10) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3)

With the latest release (1.2.1)

Any solution?

shepherdwind commented 7 years ago

+1. I have the same problem.

regular commented 7 years ago

That is weird. Check the file permissions of lib/bzip2.js, I think there's been aa glitch of some sort. In my copy it has execute permissions for reasons unknown. Does chmod -x lib/bzip2.js fix the problem?

larsthorup commented 7 years ago

it seems like lib/bzip2.js is no longer included in the tarball from npm

szemek commented 7 years ago

@regular this is a structure after installing unbzip2-stream

node_modules
└── unbzip2-stream
    ├── README.md
    ├── dist
    │   └── unbzip2-stream.min.js
    ├── index.js
    └── package.json
shepherdwind commented 7 years ago

https://github.com/regular/unbzip2-stream/commit/0d696abc28abdefe73fa327fe820e1778e0934c6#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R31

The package.json define files just include file dist/unbzip2-stream.min.js. Why files ignore lib dir?

regular commented 7 years ago

Yea, I just figured that that's the reason. Bear with, I am fixing it right now.

regular commented 7 years ago

Should be fixed in 1.2.4

kinliang commented 7 years ago

Thanks it is resolved! 👍

regular commented 7 years ago

Thanks everyone!