#Help error npm start

1 messages · Page 1 of 1 (latest)

nova wing
#

And where are you using ipcMain?

wide cloak
#

Code pls

honest olive
wide cloak
nova wing
#

you don't require ipcMain...

honest olive
# honest olive sure : https://paste.gg/p/anonymous/5daea4ad81be4da188a09c6b96a846cc

and in my update.html :


<script>
    const { ipcRenderer } = require('electron');
    const version = document.getElementById('version');
    
    ipcRenderer.send('app_version');
    ipcRenderer.on('app_version', (event, arg) => {
      ipcRenderer.removeAllListeners('app_version');
      version.innerText = 'Version ' + arg.version;
    });
    const notification = document.getElementById('notification');
    const message = document.getElementById('message');
    const restartButton = document.getElementById('restart-button');
    ipcRenderer.on('update_available', () => {
      ipcRenderer.removeAllListeners('update_available');
      message.innerText = 'A new update is available. Downloading now...';
      notification.classList.remove('hidden');
    });
    ipcRenderer.on('update_downloaded', () => {
      ipcRenderer.removeAllListeners('update_downloaded');
      message.innerText = 'Update Downloaded. It will be installed on restart. Restart now?';
      restartButton.classList.remove('hidden');
      notification.classList.remove('hidden');
    });
    function closeNotification() {
  notification.classList.add('hidden');
    }
    function restartApp() {
      ipcRenderer.send('restart_app');
    }
  </script>
honest olive
nova wing
#

const { ipcMain } = require('electron');

#

like you did with ipcRenderer

wide cloak
honest olive