Node.js native module is not a valid Win32 application error

前端 未结 4 1746
庸人自扰
庸人自扰 2021-02-07 05:11

Trying to make Hello World native module for node.js

Got an Win32 Project in VS 2012 with one file:

#include 

        
4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-07 05:38

    Just had the same problem and even though the architectures of my node and addon were identical, I got similar errors messages. It turns out that you can't rename the node executable. It has to be node.exe, I was trying to test multiple versions at the same time so I had to put them in their own folders. After that it all worked fine.

提交回复
热议问题