Next.js Discord

Discord Forum

Next.js & Tauri

Answered
Houss posted this in #help-forum
Open in Discord
Avatar
I created a next.js app and added to it tauri to make it a desktop app, the thing is in my Home page.tsx every html tag tells me ''Property 'main' does not exist on type 'JSX.IntrinsicElements'. "
(This error is for the main tag, but i have it on every other tag)
Answered by Houss
Hey, sorry in fact it was just a vscode error, i restarted my IDE and the error was gone, thanks anyways
View full answer

10 Replies

Avatar
Hi, what do you mean by main tag? Anyway the best way to package a Next.js app would be to use Vercel pkg
you might need a bit more work to get a good UX but that should be easier to figure than Tauri (see https://github.com/lbke/snext/issues/1 where I listed the question I've asked myseflf when trying pkg, I didn't investigate further though)
the thing is that Tauri uses Rust as a backend, instead of Node.js like Electron would do. That's the whole point of Tauri in the first place so probably not a proper choice to plug Next.js in.
Even integrating with Electron sounds very hard, Next.js does too much to be embedded easily in those
Avatar
Hey, sorry in fact it was just a vscode error, i restarted my IDE and the error was gone, thanks anyways
Answer
Avatar
oh nice i'll check that
Avatar
Integrating with electron is surprisingly easy and also very nice to work with. (server components and actions are in the context of the main process)
Avatar
ah great to know, I shoud check the latest news regarding that
Avatar
not sure if there are any news, i just tried around in a personal project