-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App fails to build if I use ipcRenderer #401
Comments
@0xPT have you managed to find a solution? |
I did figure out a solution for this.
|
Still running into the same problem, did you come across this?
|
Could you provide the code where this is occurring? |
I'm running into the same thing @0xPT & @AbdeenM home.tsx import React from "react";
import Head from "next/head";
import Link from "next/link";
import Image from "next/image";
import ipcRenderer from "electron";
import { useEffect } from 'react';
function sendMessage() {
console.log("sending message");
useEffect(() => {
const ipcRenderer = require("electron").ipcRenderer || false;
if (ipcRenderer) {
ipcRenderer.send("message", "Hello");
}
}, []);
}
export default function HomePage() {
return (
<React.Fragment>
<Head>
<title>Adam's Dumb App</title>
</Head>
<div className="grid grid-col-1 text-2xl w-full text-center">
<div onClick={sendMessage}> click meeeee </div>
</div>
<div className="mt-1 w-full flex-wrap flex justify-center">
<Link href="/next">Go to next page</Link>
</div>
</React.Fragment>
);
}
|
got it: #415 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As seen in the README and in the ipc-communication example, when I include this code in the file it doesn't work and gives me this error.
Error occurred prerendering page "/login". Read more: https://nextjs.org/docs/messages/prerender-error Error: Electron failed to install correctly, please delete node_modules/electron and try installing again
The text was updated successfully, but these errors were encountered: