简体   繁体   English

尽管 node-gyp 重建说 OK,iconv.node 模块错误

[英]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.我正在尝试在 React 项目中使用 active-win npm 模块,它似乎是它的依赖项之一,iconv package 不断抛出错误。 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'找不到模块:无法解析 'D:\Projects\project\myapp\node_modules\iconv\lib' 中的 '../build/Debug/iconv.node'

This is continuing despite the fact that I've gone into the iconv folder and run尽管我已经进入 iconv 文件夹并运行,但这种情况仍在继续

node-gyp rebuild节点gyp重建

with this as the result:结果是:

Generating code All 565 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.生成代码 编译了所有 565 个函数,因为没有找到以前编译的可用 IPDB/IOBJ。 Finished generating code iconv.vcxproj -> D:\Projects\project\myapp\node_modules\iconv\build\Release\iconv.node gyp info ok完成生成代码 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. gyp info 以“ok”结尾,这应该意味着我很好,但我不是。

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我有同样的问题,我已经能够使用以下 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 iconv无法使用 Microsoft Visual Studio 2017 构建,因此您需要安装 Microsoft Visual Studio 2019,我给出了这个答案,我设法在 windows 10 中构建了active-winhttps:// stackoverflow2/9381

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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