简体   繁体   中英

iconv.node Module Error despite node-gyp rebuild saying OK

I'm trying to use the active-win npm module in a React project and it seems like one of its dependencies, the iconv package keeps throwing errors. This is the error I'm getting:

Module not found: Can't resolve '../build/Debug/iconv.node' in 'D:\Projects\project\myapp\node_modules\iconv\lib'

This is continuing despite the fact that I've gone into the iconv folder and run

node-gyp rebuild

with this as the result:

Generating code All 565 functions were compiled because no usable IPDB/IOBJ from previous compilation was found. Finished generating code iconv.vcxproj -> D:\Projects\project\myapp\node_modules\iconv\build\Release\iconv.node gyp info ok

gyp info is ending with 'ok' which should mean I'm good, but I'm not.

I'm at wits' end and have no idea how to solve this. Any help would be great, thanks!

I had the same issue and I have been able to solve it using the instruction of the following url: https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md

iconv can not build with Microsoft Visual Studio 2017 so you need to install Microsoft Visual Studio 2019, I flowed this answer and I manage to build the active-win in windows 10: https://stackoverflow.com/a/59005082/9381803

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM