在我的组件中,我需要一个模块ipcRenderer。我想要得到它:
const {ipcRenderer} = require('electron')
console.log(ipcRenderer)
但结果是:
[1] ERROR in ./node_modules/electron/index.js
[1] Module not found: Error: Can't resolve 'fs' in 'C:\Users\steko\Desktop\DEV\crab\node_modules\electron'
[1] @ ./node_modules/electron/index.js 1:9-22
[1] @ ./src/components/PageCatalogLinks.jsx
[1] @ ./src/components/ContentBlock.jsx
[1] @ ./src/index.jsx
如何解决?
我尝试添加模型fs,但他已经是。