bnoordhuis / node-iconv

node.js iconv bindings - text recoding for fun and profit!
Other
799 stars 123 forks source link

Windows install issues #163

Closed onecrane closed 7 years ago

onecrane commented 7 years ago

This may be a question more than an issue, but I'm having a devil of a time with getting iconv to install, and I'm not finding any list of its install dependencies to determine if I'm missing anything. I'm on Windows 10, node 4.4.7, npm 3.8.6, node-gyp 3.4.0. Not sure if any of those are going to be the culprit. It doesn't have to be iconv 2.2.1, as long as there's some version that works with pdffiller - haven't been able to determine version dependencies from their package either.

I have a lot of information around the issue, and no clue what's relevant. Would be very grateful for assistance in getting this resolved. Thanks!

bnoordhuis commented 7 years ago

The only dependency is a working C++ compiler. If you have VS 2013/2015 or MS Build Tools installed, you should be good to go. VS 2012 and older won't cut it, they don't support C++11.

onecrane commented 7 years ago

I wish I was more knowledgeable to help narrow the problem down, but I'm pretty new to Node and npm, and don't want to uselessly speculate. I've got VS 2015, but I still see issues when I try to install it. The important-looking lines are:

"C:\Users\steve\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.c(34): error C2373: ' __pfnDliNotifyHook2': redefinition; different type modifiers [C:\d\ShipmentWizard\api\node_modules\iconv\build\iconv.vc xproj]"

"npm ERR! Failed at the iconv@2.2.1 install script 'node-gyp rebuild'."

Have attached the debug log per this instruction:

"npm ERR! Please include the following file with any support request: npm ERR! C:\d\ShipmentWizard\api\npm-debug.log"

npm-debug.txt

bnoordhuis commented 7 years ago

You seem to be using an old version of node-gyp, try upgrading it to v3.4.0. That error was fixed in nodejs/node-gyp#952.

onecrane commented 7 years ago

Looks like npm 3.8.6 is clobbering node-gyp 3.4.0 with 3.3.1, which may be the issue. Now to find what version of npm has node-gyp 3.4.0 - don't suppose there's an easy way to discover that?

onecrane commented 7 years ago

I think I got it working with some install hacking. Looks like npm doesn't really live with nodejs in Windows, so installing node-gyp 3.4.0 globally didn't affect npm's bundled version in AppData/Roaming. Installed node-gyp globally, copied it and all its dependencies from node_modules in Program Files/nodejs to npm's node_modules folder over in AppData, looks to be working now.

I'm guessing that npm plays nicer with Windows in more recent versions... ;)

Thanks for your help!