DEV Community

Build an Electron + Next.js app in 3 steps

Shiono Yoshihide on July 04, 2018

# 1. Install $ npm i -g nextron # 2. Create nextron app (with template of `examples/with-javascript-material-ui`) $ nextron init test-app --templ...
Collapse
 
proteles profile image
Aaron • Edited

You forgot to add "npm install" to your instructions in step 3 after "cd test-app"
otherwise you will get error running yarn dev the first time.

$ cd test-app
$ yarn dev
yarn run v1.7.0
$ nextron
env: node\r: No such file or directory
error Command failed with exit code 127.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

should be

$ cd test-app
$ npm install
$ yarn dev

you can also use the "npm run dev" command instead of "yarn dev"
$ npm run dev

anyhoo...
the output from npm install

> fsevents@1.2.4 install /dev/nextron_example/test-app/node_modules/fsevents
> node install

> pre-commit@1.2.2 install/dev/nextron_example/test-app/node_modules/fs-jetpack/node_modules/pre-commit
> node install.js


> spawn-sync@1.0.15 postinstall /dev/nextron_example/test-app/node_modules/fs-jetpack/node_modules/spawn-sync
> node postinstall


> uglifyjs-webpack-plugin@0.4.6 postinstall /dev/nextron_example/test-app/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js


> electron@2.0.4 postinstall /dev/nextron_example/test-app/node_modules/electron
> node install.js


> lint-staged@3.6.1 postinstall /dev/nextron_example/test-app/node_modules/fs-jetpack/node_modules/lint-staged
> echo "🚫💩 lint-staged installed! 
Do not forget to configure it. See https://github.com/okonet/lint-staged/blob/master/README.md" && exit 0

🚫💩 lint-staged installed! 
Do not forget to configure it. See https://github.com/okonet/lint-staged/blob/master/README.md
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

added 497 packages from 578 contributors, removed 112 packages, updated 901 packages and audited 10508 packages in 33.888s
found 0 vulnerabilities

then I ran yarn dev...

$ yarn dev

> test-app@1.0.0 dev /dev/nextron_example/test-app
> nextron

✔ Building renderer process
⠹ Building main process

 DONE  Compiled successfully in 290ms                                                                                                                                                                                                                 4:11:22 PM

✔ Building main process

Done! Nextron app started!
2018-07-06 16:11:24.240 Electron Helper[990:29586] Couldn't set selectedTextBackgroundColor from default ()

Collapse
 
saltyshiomix profile image
Shiono Yoshihide • Edited

Thank you for your testing nextron!

Could you try nextron@0.6.8?

(I fixed some npm installation problem.)