Open cfy2015 opened 5 years ago
in the render process, require a native module, i catch an error, it seems like it's the same problem
|-- src |-- main |-- a.js |-- index.js |-- render |-- section/talk |-- index.js
in sections/talk/index.js
const remote = require('electron').remote const engine = remote.require('./a') console.log(a)
Uncaught Error: Cannot find module './a' Require stack:
at Module._resolveFilename (internal/modules/cjs/loader.js:797)
at Function../lib/common/reset-search-paths.ts.Module._resolveFilename (electron/js2c/browser_init.js:7736)
at Module._load (internal/modules/cjs/loader.js:690)
at Module._load (electron/js2c/asar.js:738)
at Function.Module._load (electron/js2c/asar.js:738)
at Module.require (internal/modules/cjs/loader.js:852)
at electron/js2c/browser_init.js:6936
at IpcMainImpl.
do you guys solved the problem?
App threw an error during load Error: Cannot find module '../lib/node_modules/zoomsdk/build/Release/zoomsdk' at webpackEmptyContext (webpack:///./src/lib_sync?:2:10) at init (webpack:///./src/lib/zoom_sdk.js?:66:68) at Object.getInstance (webpack:///./src/lib/zoom_sdk.js?:155:28) at eval (webpack:///./src/main/index.js?:12:34) at Object../src/main/index.js (C:\Users\Administrator\Desktop\my-project\dist\electron\main.js:1533:1) at webpack_require (C:\Users\Administrator\Desktop\my-project\dist\electron\main.js:21:30) at eval (webpack:///./src/main/index.dev.js?:12:1) at Object../src/main/index.dev.js (C:\Users\Administrator\Desktop\my-project\dist\electron\main.js:1521:1) at webpack_require (C:\Users\Administrator\Desktop\my-project\dist\electron\main.js:21:30) at eval (webpack:///multi./src/main/index.dev.js./src/main/index.js?:1:1)