Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Error: Module version mismatch. Expected 13, got 11. #12

Open
mark-hahn opened this issue Jul 22, 2014 · 5 comments
Open

Error: Module version mismatch. Expected 13, got 11. #12

mark-hahn opened this issue Jul 22, 2014 · 5 comments

Comments

@mark-hahn
Copy link

I installed compress-buffer 1.2.2 with npm and saw no install errors. When I require it I get this error during the module load ...

Error: Module version mismatch. Expected 13, got 11.

I've never seen this kind of error before. I'm not seeing problems with any other module. Can anyone tell me what this means?

I'm running node 0.11.10 in windows 8.0.

@mark-hahn
Copy link
Author

I really really want to use compress-buffer because I have a totally synchronous script and I need compression. My script is an add-on module for the Atom editor.

The problem appears in bindings/bindings.js. The function that fails is bindings. Apparently the function is trying to use V8's Error API to determine the parent filename that this function is being invoked from, which is then used to find the root directory. The error output is ...

Failed to activate package named 'live-archive' Error: Module version mismatch. Expected 13, got 11.
  at Module.load (C:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
  at Function.Module._load (module.js:311:12)
  at Module.require (module.js:363:17)
  at require (module.js:379:17)
  at bindings (c:\apps\live-archive\node_modules\compress-buffer\node_modules\bindings\bindings.js:76:44)
  at Object.<anonymous> (c:\apps\live-archive\node_modules\compress-buffer\index.js:2:37)
  at Module._compile (module.js:455:26)
  at Object.Module._extensions..js (module.js:473:10)
  at Module.load (C:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
  at Function.Module._load (module.js:311:12)
  at Module.require (module.js:363:17)
  at require (module.js:379:17)
  at Object.<anonymous> (c:\apps\live-archive\lib\save.coffee:5:12)
  at Object.<anonymous> (c:\apps\live-archive\lib\save.coffee:2:1)
  at Module._compile (module.js:455:26)
  at Object.requireCoffeeScript [as .coffee] (C:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\src\coffee-cache.js:54:19)
  at Module.load (C:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
  at Function.Module._load (module.js:311:12)
  at Module.require (module.js:363:17)
  at require (module.js:379:17)
  at Object.<anonymous> (c:\apps\live-archive\lib\live-archive.coffee:3:8)
  at Object.<anonymous> (c:\apps\live-archive\lib\live-archive.coffee:2:1)
  at Module._compile (module.js:455:26)
  at Object.requireCoffeeScript [as .coffee] (C:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\src\coffee-cache.js:54:19)
  at Module.load (C:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
  at Function.Module._load (module.js:311:12)
  at Module.require (module.js:363:17)
  at require (module.js:379:17)
  at Package.module.exports.Package.requireMainModule (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\src\package.js:485:34)
  at Package.module.exports.Package.activateConfig (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\src\package.js:178:12)
  at Package.module.exports.Package.activateNow (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\src\package.js:160:14)
  at Package.module.exports.Package.handleActivationEvent (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\src\package.js:548:12)
  at HTMLDivElement.<anonymous> (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\src\package.js:3:61)
  at HTMLDivElement.jQuery.event.dispatch (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\node_modules\space-pen\vendor\jquery.js:4676:9)
  at HTMLDivElement.elemData.handle (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\node_modules\space-pen\vendor\jquery.js:4360:28)
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:400:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\node_modules\atom-keymap\lib\keymap-manager.js:181:22)
  at HTMLDocument.<anonymous> (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\src\window-event-handler.js:90:29)
  at HTMLDocument.jQuery.event.dispatch (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\node_modules\space-pen\vendor\jquery.js:4676:9)
  at HTMLDocument.elemData.handle (c:\Chocolatey\lib\Atom.0.117.0\tools\Atom\resources\app\node_modules\space-pen\vendor\jquery.js:4360:28)

@egorFiNE
Copy link
Owner

I have just installed on a clean computer straight from npm. It works just fine. Unfortunately, I have no Windows copy around.

majesty:t egor$ npm install compress-buffer
npm http GET https://registry.npmjs.org/compress-buffer
npm http 200 https://registry.npmjs.org/compress-buffer
npm http GET https://registry.npmjs.org/bindings
npm http 200 https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz
npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz

> compress-buffer@1.2.2 install /Users/egor/t/node_modules/compress-buffer
> node-gyp rebuild

  CC(target) Release/obj.target/zlib/deps/zlib/contrib/minizip/ioapi.o
  CC(target) Release/obj.target/zlib/deps/zlib/contrib/minizip/unzip.o
../deps/zlib/contrib/minizip/unzip.c:1250:46: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if ((pfile_in_zip_read_info->read_buffer == NULL))
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
../deps/zlib/contrib/minizip/unzip.c:1250:46: note: remove extraneous parentheses around the comparison to silence this warning
    if ((pfile_in_zip_read_info->read_buffer == NULL))
        ~                                    ^      ~
../deps/zlib/contrib/minizip/unzip.c:1250:46: note: use '=' to turn this equality comparison into an assignment
    if ((pfile_in_zip_read_info->read_buffer == NULL))
                                             ^~
                                             =
1 warning generated.
  CC(target) Release/obj.target/zlib/deps/zlib/contrib/minizip/zip.o
../deps/zlib/contrib/minizip/zip.c:765:15: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if ((level==2))
         ~~~~~^~~
../deps/zlib/contrib/minizip/zip.c:765:15: note: remove extraneous parentheses around the comparison to silence this warning
    if ((level==2))
        ~     ^  ~
../deps/zlib/contrib/minizip/zip.c:765:15: note: use '=' to turn this equality comparison into an assignment
    if ((level==2))
              ^~
              =
../deps/zlib/contrib/minizip/zip.c:767:15: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if ((level==1))
         ~~~~~^~~
../deps/zlib/contrib/minizip/zip.c:767:15: note: remove extraneous parentheses around the comparison to silence this warning
    if ((level==1))
        ~     ^  ~
../deps/zlib/contrib/minizip/zip.c:767:15: note: use '=' to turn this equality comparison into an assignment
    if ((level==1))
              ^~
              =
../deps/zlib/contrib/minizip/zip.c:196:12: warning: unused function 'free_linkedlist' [-Wunused-function]
local void free_linkedlist(ll)
           ^
3 warnings generated.
  CC(target) Release/obj.target/zlib/deps/zlib/adler32.o
  CC(target) Release/obj.target/zlib/deps/zlib/compress.o
  CC(target) Release/obj.target/zlib/deps/zlib/crc32.o
  CC(target) Release/obj.target/zlib/deps/zlib/deflate.o
  CC(target) Release/obj.target/zlib/deps/zlib/gzio.o
  CC(target) Release/obj.target/zlib/deps/zlib/infback.o
  CC(target) Release/obj.target/zlib/deps/zlib/inffast.o
  CC(target) Release/obj.target/zlib/deps/zlib/inflate.o
  CC(target) Release/obj.target/zlib/deps/zlib/inftrees.o
  CC(target) Release/obj.target/zlib/deps/zlib/trees.o
  CC(target) Release/obj.target/zlib/deps/zlib/uncompr.o
  CC(target) Release/obj.target/zlib/deps/zlib/zutil.o
  LIBTOOL-STATIC Release/chrome_zlib.a
  CXX(target) Release/obj.target/compress_buffer_bindings/src/compress-buffer.o
  SOLINK_MODULE(target) Release/compress_buffer_bindings.node
  SOLINK_MODULE(target) Release/compress_buffer_bindings.node: Finished
compress-buffer@1.2.2 node_modules/compress-buffer
└── bindings@1.2.1

@mark-hahn
Copy link
Author

I can't get past this problem. It must have something to do with windows (8.0) , my version of node (0.11.10) or the Atom editor environment (0.120.0). I've installed a number of gyp modules so I'm pretty sure my environment and Visual Studio are correct.

Have you ever seen an error like Module version mismatch. Expected 13, got 11.. I have no idea what that means. Your version is 1.2.2.

I just tried it with a fresh empty project and got the same results.

I know this is asking too much, but I'd have no problem letting you remote into my pc.

In any case I guess I'll just have to wait until the future node version that offers the sync version of zlib.

Thanks for your trouble.

@egorFiNE
Copy link
Owner

node.js 0.11.10 is an unstable release, which is also old. Update to 0.11.13, which already has sync interface to zlib. I would suggest that you abandon node-compress-buffer as it is a little bit dated project not really relevant for long time already.

@mark-hahn
Copy link
Author

Unfortunately node is built-into the atom editor and I can't change it. Oh
well, thanks again.

On Tue, Jul 29, 2014 at 9:01 AM, Egor Egorov notifications@github.com
wrote:

node.js 0.11.10 is an unstable release, which is also old. Update to
0.11.13, which already has sync interface to zlib. I would suggest that you
abandon node-compress-buffer as it is a little bit dated project not really
relevant for long time already.


Reply to this email directly or view it on GitHub
#12 (comment)
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants