SimulatedGREG / electron-vue

An Electron & Vue.js quick start boilerplate with vue-cli scaffolding, common Vue plugins, electron-packager/electron-builder, unit/e2e testing, vue-devtools, and webpack.
https://simulatedgreg.gitbooks.io/electron-vue/content/
MIT License
15.47k stars 1.55k forks source link

try to use a native addon,but can't run #786

Open cfy2015 opened 5 years ago

cfy2015 commented 5 years ago

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)

xinyang3 commented 4 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:

joshuafc commented 3 years ago

do you guys solved the problem?