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

%1 is not a valid Win32 application. #3052

Closed
ghost opened this issue Nov 26, 2014 · 12 comments
Closed

%1 is not a valid Win32 application. #3052

ghost opened this issue Nov 26, 2014 · 12 comments

Comments

@ghost
Copy link

ghost commented Nov 26, 2014

Hello everyone,
I've installed the node module for pouchdb, but when I try to run my application I get this error:

Uncaught node.js Error 
Error: %1 is not a valid Win32 application. 

c:\App\node_modules\pouchdb\node_modules\leveldown\build\Release\leveldown.node
    at Error (native)
    at Module.load (module.js:354:32)
    at Function.Module._load (module.js:310:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at bindings (C:\App\node_modules\pouchdb\node_modules\leveldown\node_modules\bindings\bindings.js:76:44)
    at Object.<anonymous> (C:\App\node_modules\pouchdb\node_modules\leveldown\index.js:1:99)
    at Module._compile (module.js:454:26)
    at Object.Module._extensions..js (module.js:472:10)
    at Module.load (module.js:354:32)

I dont know if someone else had this and how he/she resolved it.

Thank you for your help.

btw: I'm using Windows 8.1 x64

@nolanlawson
Copy link
Member

This is a bug in node-leveldown; IIRC they have problems building on Windows.

The workaround is... I dunno, @calvinmetcalf is there some way to disable LevelDOWN and use SQLdown or medeadown or something else instead? We should start documenting this in our FAQs due to the volume of issues we get about this.

@ghost
Copy link
Author

ghost commented Nov 26, 2014

Oh ok, I hope you can find a way to resolve this, as PouchDB is amazing and I've been using it in many projects before, but first time I try this with node.

@nolanlawson
Copy link
Member

I'll try asking the in ##leveldb room in IRC

@nolanlawson
Copy link
Member

If you can figure out a way to force-install pouchdb without levelup installing correctly, then you can just swap it out for any other *down adapter at runtime.

@jacargentina
Copy link
Contributor

I've also run on issues when trying to use pouchdb-server on Node on Windows; stuck with the "hard work" of having to compile leveldown.

Hope there is a way to solve that :)

👍

@nolanlawson
Copy link
Member

@cedriking which version of Node are you using?

@NickColley
Copy link
Contributor

Could this help? https://www.npmjs.org/package/leveldown-prebuilt

@ghost
Copy link
Author

ghost commented Nov 26, 2014

I'm currently using Node v0.11.13

@daleharvey
Copy link
Member

I tried a test run with https://www.npmjs.org/package/leveldown-prebuilt previously, I gave up on it fairly early but should look into it again, if we can fix the windows build problems it would be good, getting a lot of problems with them and I just hoped they would get fixed upstream

@No9
Copy link

No9 commented Nov 27, 2014

So from the error it looks like leveldown.node is built as 64 bit but you may be running 32bit node?
As level is built successfully I am assuming that you have a Visual Studio installed?

If so Can you open the Developer Command Prompt under Visual Studio Tools in All programs and run
> dumpbin /headers "C:\Program Files\nodejs\node.exe"

And copy the output here

If node isn't installed there then you can find out where it is by going

> where node

Thanks

@rvagg
Copy link

rvagg commented Dec 23, 2014

^^ what @No9 said, the problem of a mismatch of 32 vs 64 bit node executable vs addon on Windows is a hairy one and usually most easily solved by just opting for the 32-bit version of Node from the beginning.

@daleharvey
Copy link
Member

Upstream issue that looks fixed

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