saltyshiomix / nextron Goto Github PK
View Code? Open in Web Editor NEW⚡ Next.js + Electron ⚡
Home Page: https://npm.im/nextron
License: MIT License
⚡ Next.js + Electron ⚡
Home Page: https://npm.im/nextron
License: MIT License
As the title asks, I’m trying to add support for API routes into the Nextron with Material UI example, although I’m getting stuck on the ipcRenderer part, where the app tends to freeze after the initial paint.
Any assistance would be appreciated.
When add a simple AppBar as separate component to the home.tsx the app is broken and gets this error:
TypeError: Cannot read property 'sheetsRegistry' of undefined
is it possible to use app/background.js
(in package.json) to something else? I saw build directory name to be nextron
, seems like that has been renamed to app
any config option?
Hey,
On my other next.js project I have a config
`
// next.config.js
const withCSS = require('@zeit/next-css');
module.exports = withCSS({
webpack: function (config) {
config.module.rules.push({
test: /.(eot|woff|woff2|ttf|svg|png|jpg|gif)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000,
name: '[name].[ext]'
}
}
});
return config
}
}
);
`
and in Nextron we have this
module.exports = { webpack: (config) => Object.assign(config, { target: 'electron-renderer', }), };
Question - how to combine them?
I tried multiple ways of setting config but without much success.
As a side note, I am trying to add support for Semantic UI where one of the steps requires import 'semantic-ui-css/semantic.min.css'
Cheers!
ipcMain.on() still run after background hot reload
you can add alert('a')
on this line
and then reload background.js, click the button, you can see two alert; reload again, you can see three alert.
and after reload, the output won't appear on console.
Sorry to bother you, I'm not sure if I should post my question here but I wanted to use nextron alongside elastic ui which is a collection of React UI components.
I created a new project with nextron init my-app --example with-javascript
and then I did yarn add @elastic/eui @elastic/datemath moment
which installs the aforementioned library and then i did the usual stuff yarn && yarn dev
and edited home.jsx to use eui like this:
import React from 'react';
import Head from 'next/head';
import { resolve } from '../helpers';
import {
EuiButton,
EuiFlexGroup,
EuiFlexItem,
} from '@elastic/eui';
export default () => (
<React.Fragment>
<Head>
<title>Home - Nextron (with-javascript)</title>
</Head>
<div>
<EuiFlexGroup gutterSize="s" alignItems="center">
<EuiFlexItem grow={false}>
<EuiButton
onClick={() => resolve('next')}>
Go to next pages
</EuiButton>
</EuiFlexItem>
</EuiFlexGroup>
</div>
</React.Fragment>
);
I was expecting to see Nextron using EUI, but I was wrong. Instead I get a very extrange error saying ReferenceError: HTMLElement is not defined at Object.<anonymous> (/home/ferbraz/Documents/Code/Electron/my-app/node_modules/@elastic/eui/lib/components/focus_trap/focus_trap.js:197:77) [.....]
My question is: is it viable to use Nextron with a third party library like EUI? Do you have any idea on how to make those work together?
Sorry if I'm wrong by posting this question here, but I think that my error is related to the internals of Nextron, as EUI works with Create React App.
Looking at the README.md you wrote:
If you need more performance with Electron, you should see these boilerplates
Is there any known performance issue?
After the creation of a new project, when I try to tun npm run dev
I'm getting the next error:
Error: Cannot find module 'mime'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/node_modules/send/index.js:24:12)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
(node:22046) UnhandledPromiseRejectionWarning: Error: Command failed: node_modules/.bin/next export renderer
module.js:549
throw err;
The mime module is installed just in case. This wasn't happening with the version 0.6.7, I upgrade to the latest and start happening.
Thanks
It may be a personal choice, but I think a .gitignore
file with:
app
dist
node_modules
would be nice to include in the scaffold
Is there any way to do parameterized routing for the pages in nextron?
Zeit has next.js use a custom server for parameterized routing, either their http module or express.js or similar (like in https://github.com/zeit/next.js/tree/canary/examples/parameterized-routing) but I can't tell if there is a way to pull it off with the awesome surgery you've done around next to make nextron.
npm install --global nextron@latest
nextron init excel-trans --template with-typescript-material-ui
cd excel-trans
yarn install
`➜ excel-trans yarn dev
yarn run v1.13.0
$ nextron
[ wait ] starting the development server ...
[ info ] waiting on http://localhost:8888 ...
[ error ] ./pages/_app.tsx
Module not found: Can't resolve '../components/theme' in '/Developments/Nextron/excel-trans/renderer/pages'
[ wait ] compiling ...
[ error ] ./pages/_app.tsx
Module not found: Can't resolve '../components/theme' in '/Developments/Nextron/excel-trans/renderer/pages'
`
Hi,
I've created a new project based on the with-javascript-material-ui
example.
I'm using "nextron": "^5.10.6".
I've added typeface-roboto
via yarn add typeface-roboto
Imported it via : import 'typeface-roboto';
in my home.jsx
.
I'm getting the following error:
Failed to compile
../node_modules/typeface-roboto/index.css 2:0
Module parse failed: Unexpected character '@' (2:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| /* roboto-100normal - latin */
> @font-face {
| font-family: 'Roboto';
| font-style: normal;
I've searched around a about css loaders and the base configuration seems fine (taken from webpack.base.config.js):
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
Any suggestions on how I can fix this?
Thanks,
Erik.
Also,
when I import from 'nextron'
. I got warning
Could not find a declaration file for module 'nextron'.
I see that nextron is written in Typescript. But how do I get the type definition? Maybe it's not published on the npm?
Related #47
The two python examples are fairly different in intent in ways that might be difficult for new visitors to spot given how similar their names are.
The current with-typescript-python
example is focused on using python to provide long-lasting backend services to the electron processes. The current with-python
example is focused on using python to perform one-off processing tasks. Each has value but the use cases are quite different. By renaming the current with-typescript-python
to with-typescript-python-api
we would both reduce visitor confusion and allow both use-cases to be available as examples in both languages (typescript and javascript).
I'm happy to do the renaming work and send a PR if you like the suggestion.
When running npm run dev
, I'm getting this from node-serialport
:
The module <path/to/bindings> was compiled with NODE_MODULE_VERSION 70. This version of Node.js requires NODE_MODULE_VERSION 72
I've tried installing electron
and using electron-rebuild
, upgrading all my dependencies, and trying everything I could from the official tutorial but still get this message. Honestly, I have no idea how Electron is getting launched using npm run dev
...
i want to ask, how to change the icon?
Hi @saltyshiomix ,
This is suuppeerrr.
May I know what's the roadmap for this project? Planned feature? etc.
Also this sentence If you need performance with Electron, you should see these boilerplates
on README . Does that mean nextron is not performance enough?
I want to write preload file on typescript, but as far as I know it needs to be precompiled first
Will there be any case how to do this?
When running yarn dev
, I see this warning in the console:
The static directory has been deprecated in favor of the public directory. https://err.sh/zeit/next.js/static-dir-deprecated
I think the fix may be as simple as updating the static
file paths to use public
instead.
Using the with-typescript template...
const withTypeScript = require('@zeit/next-typescript')
const withLess = require('@zeit/next-less')
const { detectExportPathMap } = require('nextron')
module.exports = withTypeScript(withLess({
webpack: (config) => {
config.target = 'electron-renderer'
return config
},
exportPathMap: detectExportPathMap
}))
yarn run v1.7.0$ nextronDefining routes from exportPathMap(node:9180) UnhandledPromiseRejectionWarning: Error: Chunk.entrypoints: Use Chunks.addGroup instead at Chunk.set (C:\Users\Dan\Desktop\test\wit-ts\node_modules\webpack\lib\Chunk.js:829:9) at C:\Users\Dan\Desktop\test\wit-ts\node_modules\extract-text-webpack-plugin\dist\index.js:176:40
at Array.forEach (<anonymous>)
at Compilation.<anonymous> (C:\Users\Dan\Desktop\test\wit-ts\node_modules\extract-text-webpack-plugin\dist\index.js:171:18) at Compilation.applyPluginsAsyncSeries (C:\Users\Dan\Desktop\test\wit-ts\node_modules\tapable\lib\Tapable.js:206:13)
at Compilation.seal (C:\Users\Dan\Desktop\test\wit-ts\node_modules\next\node_modules\webpack\lib\Compilation.js:605:8)
at applyPluginsParallel.err (C:\Users\Dan\Desktop\test\wit-ts\node_modules\next\node_modules\webpack\lib\Compiler.js:504:17)
at C:\Users\Dan\Desktop\test\wit-ts\node_modules\tapable\lib\Tapable.js:289:11
at Promise.all.then (C:\Users\Dan\Desktop\test\wit-ts\node_modules\next\node_modules\webpack\lib\DynamicEntryPlugin.js:45:21)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:9180) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9180) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:9180) UnhandledPromiseRejectionWarning: Error: Chunk.entrypoints: Use Chunks.addGroup instead
at Chunk.set (C:\Users\Dan\Desktop\test\wit-ts\node_modules\webpack\lib\Chunk.js:829:9)
at C:\Users\Dan\Desktop\test\wit-ts\node_modules\extract-text-webpack-plugin\dist\index.js:176:40
at Array.forEach (<anonymous>)
at Compilation.<anonymous> (C:\Users\Dan\Desktop\test\wit-ts\node_modules\extract-text-webpack-plugin\dist\index.js:171:18)
at Compilation.applyPluginsAsyncSeries (C:\Users\Dan\Desktop\test\wit-ts\node_modules\tapable\lib\Tapable.js:206:13)
at Compilation.seal (C:\Users\Dan\Desktop\test\wit-ts\node_modules\next\node_modules\webpack\lib\Compilation.js:605:8)
at applyPluginsParallel.err (C:\Users\Dan\Desktop\test\wit-ts\node_modules\next\node_modules\webpack\lib\Compiler.js:504:17)
at C:\Users\Dan\Desktop\test\wit-ts\node_modules\tapable\lib\Tapable.js:289:11
at Promise.all.then (C:\Users\Dan\Desktop\test\wit-ts\node_modules\next\node_modules\webpack\lib\DynamicEntryPlugin.js:45:21)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
(node:9180) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
Done in 5.05s.
PS C:\Users\Dan\Desktop\test\wit-ts>
From what I've seen, the React ecosystem commonly uses a top level build
folder as an output folder name as a result of the hinting and tool chains used with create-react-app. Nextron is build around Next.js rather than create-react-app, but many React developers move back and forth between next and cra projects, and the current nextron build folder naming convention confuses those efforts. Renaming the current build
folder to nextron
would also have the side effect of providing better branding and developer awareness on nextron projects, hopefully increasing use and awareness of nextron on new projects.
I'm happy to submit a PR if you think this sounds like an idea worth considering.
How to:
— integrate with python-shell (for using Python scripts with sqlite)
— build for windows?
Currently when adding electron-store
to any example (both typescript and js) the loaded page has an internal server error caused by a TypeError.
I've encountered similar issues when building the app using electron-next
. I'm going to research this as well to see how to make sure Next can see the electron app.
TypeError: Cannot read property 'app' of undefined
at new ElectronStore (/Users/coletownsend/Documents/gits/captcha/node_modules/electron-store/index.js:8:55)
at Module../pages/_app.jsx (/Users/coletownsend/Documents/gits/captcha/renderer/.next/server/static/development/pages/_app.js:337:21)
at __webpack_require__ (/Users/coletownsend/Documents/gits/captcha/renderer/.next/server/static/development/pages/_app.js:23:31)
at Object.0 (/Users/coletownsend/Documents/gits/captcha/renderer/.next/server/static/development/pages/_app.js:886:18)
at __webpack_require__ (/Users/coletownsend/Documents/gits/captcha/renderer/.next/server/static/development/pages/_app.js:23:31)
at /Users/coletownsend/Documents/gits/captcha/renderer/.next/server/static/development/pages/_app.js:91:18
at Object.<anonymous> (/Users/coletownsend/Documents/gits/captcha/renderer/.next/server/static/development/pages/_app.js:94:10)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:20:18)
at _callee3$ (/Users/coletownsend/Documents/gits/captcha/node_modules/next/dist/server/render.js:225:40)
at tryCatch (/Users/coletownsend/Documents/gits/captcha/node_modules/regenerator-runtime/runtime.js:62:40)
I created project by this command.
npx create-nextron-app <MY-APP> --example with-typescript-material-ui
and run npm run build
This time I finished this command successfully.
But after I installed firebase by this command.
npm install --save firebase
and I run npm run build
again
there are these error
rebuilding native dependencies [email protected] platform=darwin arch=x64
Failed at the [email protected] install script.
Please kindly check. Thank you
Hi,
first i would like the say thanks for the idea, so thanks ! :)
My question is: will it works if i try to implements redux within nextron ? Because i guess internaly it's using export to html from nextjs right ?
Best regards.
Could not load TypeScript. Try installing with
yarn add typescript
ornpm install typescript
. If TypeScript is installed globally, try usingyarn link typescript
ornpm link typescript
.
Maybe npm install error.
Try commands below:
$ rm -rf node_modules
$ yarn
# with no error
$ yarn dev
$ yarn build
I am working on a project with Next and Electron so this project really helped me a lot.
Thank you for your effort so far.
Everything works fine on dev.
However, I encountered an error when I tried to build the basic code(the files you get after init):
I know that this is probably not an issue of nextron, but I've been stuck for days trying to build my project.
Any suggestions maybe?
Thank you.
I notice that for link we use href={resolve('pathname')}
. Why so? We could just use next/link
isn't it?
next.js 9 provide api route
nextron support it?
Hey there! Thank you for all of your incredible and wonderful work.
My team loves me for having implemented Nextron into our repo. In turn, I remind and tell them about the fact that it's the maintainers of Nextron they should be loving :)
We do have a question, however:
What is the most straightforward way to update/upgrade our nextron implementation? :)
Thank you!
I noticed in https://dev.to/saltyshiomix/build-the-electron--nextjs-app-for-3-steps-5g2p you mentioned hot reloading for both main and renderer processes is todo. I was just wondering how long it might be before that gets implemented?
I thank you. This project really helped me get off the ground!
$ yarn dev
yarn run v1.7.0
$ node build/nextron.js
module.js:545
throw err;
^
Error: Cannot find module '****nextron/examples/with-typescript-material-ui/build/nextron.js'
at Function.Module._resolveFilename (module.js:543:15)
at Function.Module._load (module.js:470:25)
at Function.Module.runMain (module.js:690:10)
at startup (bootstrap_node.js:194:16)
at bootstrap_node.js:666:3
If we use a custom file protocol to serve static files in production, we can avoid the resolve helpers and LinkWithIpc
.
Related: #10 ,electron-serve
I'm trying to use web workers with nextron (+typescript), but I haven't found any easy way yet.
I tried installing @zeit/next-workers and worker-loader.
Also, needed to set some global typings as explained in the webpack configuration (Integrating with TypeScript):
// typings/custom.d.ts
declare module 'worker-loader!*' {
class WebpackWorker extends Worker {
constructor();
}
export default WebpackWorker;
}
Trying to include the worker...
import TestWorker from 'worker-loader!../../test.worker';
//...
const worker = new TestWorker();
worker.postMessage({ foo: 'bar' });
worker.addEventListener('message', (event) => console.log(event));
compiles ok, but when trying to execute that code, it results in a 404
GET http://localhost:8888/_next/c00177f2ed8cf0fa8620.worker.js 404 (Not Found)
Funny thing here is, getting into the .next
directory, I can see it...
$ ls nextron/renderer/.next/c00177f2ed8cf0fa8620.worker.js
c00177f2ed8cf0fa8620.worker.js
I can keep trying and if I manage anything, open a PR adding an example on how to use workers but, any ideas on this problem?
Hi.
I use this for create mac app.
Requires two environments dev / prod, so I want to switch configuration.
But nextron don't have a electron-buider configuration(--config).
Please let me know if there is any way
Hi Everyone,
I am opening this issue here, after spending long time on the internet to resolve the related issue but no luck.
THE ISSUE:
I am running an electron app with an example template of material ui and javascript.
Everything is working fine, but when I install the "puppeteer-core" library (version 2.0.0) and import it like
import puppeteer from "puppeteer-core";
I start getting the following error
Ofcourse then I started looking at SO and Google for this error and the "resolution" that everyone is suggesting is to use the following setting for webpack.config.js file
const config = { // ... externals: { puppeteer: 'require("puppeteer")', // ... }, };
Since nextron is based on next js, the place that I could find to put this setting was in 'next.config.js'
So I put the following code in it
... config.externals = { puppeteer :'require("puppeteer")' } ... return config;
But when I do this, A very strange error starts coming up.
I am really not sure, what is going on here.
It would be really helpful if someone can just tell me what is going on, and how to resolve this.
Thanks in advance
It looks like nextron was formatted with linux-incompatible new line symbols (\r\n
instead of \n
).
Fixed the issue by opening the executable in VSCode by typing code "$(which nextron)"
and changing the new line symbols from CRLF to LF in the bottom bar.
This example works in electron, but it's broken when I open localhost:8888/home in browser. I see the following error in devtools console:
ReferenceError: Can't find variable: require
Running next build renderer
within a project generated with nextron init --example with-javascript-ant-design
results in this:
Creating an optimized production build ...
> Using external babel configuration
> Location: "/Users/boneskull/projects/nextron-test/renderer/.babelrc"
Compiled successfully.
> Build error occurred
/Users/boneskull/projects/nextron-test/node_modules/antd/lib/style/index.css:7
body {
^
SyntaxError: Unexpected token {
at Module._compile (internal/modules/cjs/loader.js:720:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Module.require (internal/modules/cjs/loader.js:683:19)
at require (internal/modules/cjs/helpers.js:16:16)
at Object.<anonymous> (/Users/boneskull/projects/nextron-test/node_modules/antd/lib/button/style/css.js:3:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32) {
type: 'SyntaxError',
'$error': '$error'
}
(Running nextron build
is somewhat problematic, because it allows next build
to fail silently--I had to do this to figure out what actually happened)
how i can change port default from 8888 to another port?
thank you
I have a problem,When I build, the error message is as follows:
D:\Temp\TXSSPrinting>npm run build
[email protected] build D:\Temp\TXSSPrinting
node nextron/nextron.js build
√ Clearing previous builds
√ Building renderer process
√ Building main process
| Packaging - please wait a momentnpm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: node nextron/nextron.js build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
The following is the error log:
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\andyTsing\AppData\Roaming\npm-cache_logs\2019-06-11T15_06_10_997Z-debug.log
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'D:\Program Files\nodejs\node.exe',
1 verbose cli 'D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'build'
1 verbose cli ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]prebuild: [email protected]build: [email protected]
6 info lifecycle [email protected]
7 verbose lifecycle [email protected]build: unsafe-perm in lifecycle truebuild: PATH: D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;D:\Temp\TXSSPrinting\node_modules.bin;C:\Python27;C:\Python27\Scripts;C:\Program Files\AdoptOpenJDK\jdk-12.0.1.12-hotspot\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\Microsoft MPI\Bin;C:\Program Files\AdoptOpenJDK\jdk-12.0.1.12-hotspot\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft VS Code Insiders\bin;C:\Program Files\Git\cmd;D:\Program Files\Calibre2;D:\Program Files\Microsoft Visual Studio\Shared\Python36_64;D:\Depot;C:\Python27;D:\Program Files\Redis;C:\ProgramData\chocolatey\bin;D:\Program Files\nodejs;D:\Flutter\bin;D:\Flutter\bin\cache\dart-sdk\bin;C:\Users\andyTsing\AppData\Roaming\Pub\Cache\bin;D:\Go\bin;C:\Program Files\MySQL\MySQL Shell 8.0\bin;C:\Users\andyTsing\AppData\Roaming\npm;C:\Users\andyTsing\go\bin
8 verbose lifecycle [email protected]
9 verbose lifecycle [email protected]build: CWD: D:\Temp\TXSSPrintingbuild: Args: [ '/d /s /c', 'node nextron/nextron.js build' ]
10 silly lifecycle [email protected]
11 silly lifecycle [email protected]build: Returned: code: 1 signal: nullbuild: Failed to exec build script
12 info lifecycle [email protected]
13 verbose stack Error: [email protected] build: node nextron/nextron.js build
13 verbose stack Exit status 1
13 verbose stack at EventEmitter. (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:200:13)
13 verbose stack at ChildProcess. (D:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:200:13)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
14 verbose pkgid [email protected]
15 verbose cwd D:\Temp\TXSSPrinting
16 verbose Windows_NT 10.0.17763
17 verbose argv "D:\Program Files\nodejs\node.exe" "D:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "build"
18 verbose node v12.3.1
19 verbose npm v6.9.0
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] build: node nextron/nextron.js build
22 error Exit status 1
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I'll keep on meintenancing, but I think it's better to be more open :)
Any ideas?
Please feel free to comment and raise your hands for nextron 👍
hi! we love nextron, it allowed us to iterate super quickly from scratch on a new electron app. however, we faced difficulties (as many developers do) when putting some load on the main thread via IPC, as the renderer thread regularly freezes.
there are several solutions to this, one being having a second BrowserWindow
that's hidden and communicates with the first window via the main thread's IPC bus. something like this isn't supported in nextron right now, or is it?
having a second next.js process building a worker process could be beneficial for building apps that require medium-level computation, especially as 1) next.js is running/included as dependency anyway and 2) next.js wraps webpack conveniently.
cheers!
Hi.
I want to run node process in production build app.
In the development environment, run server, so execute node in pages/api/hoge.ts, but production build app can't run.
The reason is that I want to run ffmpeg and image processing
please teach me.
Good night!
First of all, excellent work! I will definitively adopt this lib to build my desktop app.
Is possible to render Web Components on SSR using your solution? To be more specific, I would like to use http://onsen.io
Regards.
Hey,
I've experienced errors from renderer getting swallowed by nextron. The result is no output, no electron starting, nothing. I could make them visible by modifying https://github.com/saltyshiomix/nextron/blob/master/lib/nextron-dev.ts#L94.
watching = compiler.watch({}, async (err, stats) => {
// Start mod: Super dirty error handling, you get the point :)
const errors = stats.toJson().errors;
if (errors && errors.length) {
console.error(new Error(errorss[0]));
}
// End mod
if (!err && !stats.hasErrors()) {
if (isHotReload) {
await delay(2000);
}
isHotReload = true;
spawn.sync('electron', ['.', `${rendererPort}`], spawnOptions);
}
});
Hi,
Whats the recommended way to publish? I know I can use electron-builder --publish
, but this will also rebuild the application bundles. And nextron build
will also always build application bundles, so I'm not sure how to build & publish without building twice.
The best solution for me would be to have nextron build
which would only create JS bundles. Or if nextron would accept the --publish
argument. Or do I miss something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.