https://github.com/TooTallNate/node-expat/tree/gyp和 node-gyp 用于编译它。生成了 node_expat.node。在代码中引用时出现以下错误:
module.js:485
process.dlopen(filename, module.exports);
^
Error: The specified module could not be found.
C:\Users\s\Desktop\Translink\TooTallNate-node-expat-e7d7cb5\build\Releas
\node_expat.node
at Object.Module._extensions..node (module.js:485:11)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (C:\Users\s\Desktop\Translink\server.js:1:181)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
我无法进一步尝试在 Windows 上获取 node-expat。感谢任何输入。