问题描述
系统信息:
- 纱线:
1.22.10
- 节点:
14.15.0
- npm:
6.14.5
- 系统:
windows 10 64bit
复制步骤:
- 我刚刚获取了:https://github.com/codesbiome/electron-react-webpack-typescript-2020
- 然后运行:
yarn add winax
- 然后在
App.tsx
行(或required("winax")
)下添加import "winax"
- (可选),然后在App.tsx中添加
const gt = new ActiveXObject('InsERT.gt')
并发生以下错误:
Uncaught Error: Cannot find module './build/Release/node_activex'
at webpackMissingModule (activex.js:1)
at Object../node_modules/winax/activex.js (activex.js:1)
at __webpack_require__ (bootstrap:789)
at fn (bootstrap:100)
at Object../node_modules/winax/index.js (index.js:1)
at __webpack_require__ (bootstrap:789)
at fn (bootstrap:100)
at Module../src/app/core/Subiekt.ts (Subiekt.ts:1)
at __webpack_require__ (bootstrap:789)
at fn (bootstrap:100)
我尝试了很多来自Google的潜在解决方案,但没有任何结果。看来文件webpack
没被看到。我在build/Release/node_activex
中检查了node_modules
,这些文件在那里。我已经尝试过winax
和electron
这样的electron-rebuild
文档中的命令[1] [2],安装了windows-tools
等,但也没有任何结果。
另外,当我创建了一个没有电子,打字稿和所有这些东西的新的极速快递项目后,安装并导入winax
时,它可以按预期工作。
[1] https://www.npmjs.com/package/winax#building
[2] https://www.electronjs.org/docs/tutorial/using-native-node-modules
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)