cannot find module in electron prebuilt 1.x but in 0.x (0.2 and 0.3 -
i have small code, run in electron (using prebuild 0.3.5, , 0.25).
i upgrade electron prebuild 1.1.0 , 1.2.0
i got error
uncaught exception: error: cannot find module 'app' @ module._resolvefilename (module.js:438:15) @ function.module._resolvefilename (/home/mervo/electron/midas-tron/node_modules/electron-prebuilt/dist/resources/electron.asar/common/reset-search-paths.js:47:12) @ function.module._load (module.js:386:25) @ module.require (module.js:466:17) @ require (internal/module.js:20:19) @ object. (/ho
i think there change in structure in 1.x, dont know, can help?
the correct way require app
module in electron v1.0.0+ is:
const { app } = require('electron');
the same applies other built-in electron module require directly.
Comments
Post a Comment