electron-ipc-stream
electron-ipc-stream copied to clipboard
Uncaught exception: cannot find module app
When I am trying to run this electron-ipc-stream app, i am getting this "Uncaught Exception:
Error: Cannot find module 'app' ". Please any one help me to resolve this issue.
I installed app npm. Now the above error is solved. But I am getting another error now.
After trying little bit, now getting this error. Please anyone help me
A module that you're using is expecting an old version of electron. Are you sure that you're using the latest electron-ipc-stream?
Yes I am using the latest. Just yesterday I downloaded the sample and tried. I first did - npm install, if any packages missing, i installed it separately, and I run the app using "electron ./test/main-to-read/". Then I got the error.
For others who may have this problem still, I ran into this same sequence of errors. It was because the code for index.js or main.js needed to use updated syntax for the new version of electron. New: const {app} = require('electron') const {BrowserWindow} = require('electron')
app.on('ready', function() { var mainWindow = new BrowserWindow({ width: 800, height: 600 }) mainWindow.loadURL('file://' + __dirname + '/index.html') })
Instead of the old: var app = require('app') var BrowserWindow = require('browser-window')
app.on('ready', function() { var mainWindow = new BrowserWindow({ width: 800, height: 600 }) mainWindow.loadUrl('file://' + __dirname + '/index.html' })
I found this updated code in the comments of this youtube video: https://www.youtube.com/watch?v=ojX5yz35v4M
If this does not work, refer to the getting started example in the electron docs to see the updated syntax: https://github.com/electron/electron/blob/master/docs/tutorial/first-app.md