Electron-react-boilerplate: Installation Debugging Solutions

Created on 20 Sep 2016  ·  19Comments  ·  Source: electron-react-boilerplate/electron-react-boilerplate

Installation Failure

This aims to be a list of solutions for installation issues with this project:

  1. Fix node-gyp issues:
    Follow the steps in https://github.com/nodejs/node-gyp#installation. You don't need to install node-gyp but make sure that you have the correct environment setup for your OS.
  2. Test installation against latest yarn/node version
  3. Fix Caching Issues

rm -rf node_modules && yarn cache clean && yarn && yarn electron-rebuild && yarn dev

  1. If you're on Windows, try using cmder

Debugging Release Builds

DEBUG_PROD=true yarn build && DEBUG_PROD=true yarn start

discussion doc

Most helpful comment

@TimothyLe Please be watchful with the wording. In such a OSS project, no one owes you anything.

All 19 comments

@TimothyLe Please be watchful with the wording. In such a OSS project, no one owes you anything.

Comment Lines 54 and 66 in main.development.js, repackage, and open devtools.

are those line numbers still correct?

@barbalex thanks for letting me know. I just updated my comment to reflect those changes

The links to the lines miss the /app in https://github.com/chentsulin/electron-react-boilerplate/blob/master/app/main.development.js

My bad. Should have checked that. Fixed now

Commenting lines 12 and 17 in main.development.js throws this error on Windows during repackaging:

ERROR in ./app/main.js from UglifyJs
SyntaxError: Unexpected token punc «}», expected punc «:» [./~/electron-debug/index.js:23,32]

This happens during the command cross-env NODE_ENV=production node -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.electron.js --progress --profile --colors

@jeromepl does this happen for you with the latest version of the boilerplate?

Alright I figured it out after doing a bisect: I had replaced babili-webpack-plugin by UglifyJS which meant that dev dependencies such as electron-debug were not transpiled using Babel. My bad!

First of all thanks a lot for all your hard work on this repo, its been invaluable for a project I've undertaken recently which has required a turnaround of less than a month!

Recently I've been having some problems debugging. build-renderer is freezing on '91% additional asset processing' and eventually running out of memory. I have no output or log to help pinpoint the problem, is this something anyone has come across before? Thanks!

Running yarn or npm install does not work. It just hangs there forever after error code 0

$ yarn
yarn install v0.24.5
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
warning [email protected]: The platform "darwin" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
warning [email protected]: The platform "darwin" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] 🔗 Linking dependencies...
warning "[email protected]" has incorrect peer dependency "webpack@^2.2.0".
warning "[email protected]" has incorrect peer dependency "webpack@^2.2.0".
warning "[email protected]" has incorrect peer dependency "webpack@1 || ^2.1.0-beta || ^2.2.0-rc.0".
[4/4] 📃 Building fresh packages...
success Saved lockfile.
$ concurrently "npm run flow-typed" "npm run build-dll" "electron-builder install-app-deps" "node node_modules/fbjs-scripts/node/check-dev-engines.js package.json"
[3] node node_modules/fbjs-scripts/node/check-dev-engines.js package.json exited with code 0
[2] electron-builder 19.8.0
[0]
[0] > [email protected] flow-typed /Users/RAVEN/Desktop/frontend/bitch
[0] > rimraf flow-typed/npm && flow-typed install --overwrite || true
[0]
[1]
[1] > [email protected] build-dll /Users/RAVEN/Desktop/frontend/bitch
[1] > cross-env NODE_ENV=development node --trace-warnings -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.renderer.dev.dll.js --colors
[1]
[2] Installing app dependencies for arch x64 to /Users/RAVEN/Desktop/frontend/bitch/app
[2] electron-builder install-app-deps exited with code 0
[0] • Found 82 dependencies in package.json to install libdefs for. Searching...
[0] • rebasing flow-typed cache...
[1] Hash: dfc26ee8dbdd12524347
[1] Version: webpack 3.0.0
[1] Time: 5685ms
[1] Asset Size Chunks Chunk Names
[1] renderer.dev.dll.js 1.43 MB 0 [emitted] [big] renderer
[1] [./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 517 bytes {0} [built]
[1] [2] dll renderer 12 bytes {0} [built]
[1] + 311 hidden modules
[1] npm run build-dll exited with code 0

@ReMuSoMeGa Your issue with yarn/npm install has been discussed and fixed #1051 👍

npm run dev warns that Chunk.modules is deprecated, upgrading _extract-text-webpack-plugin_ to 3.0.1 (2.1.0 former) solves. Haven't seem newly introduced issues so far.

> cross-env HOT=1 NODE_ENV=development electron -r babel-register -r babel-polyfill ./app/main.renderer

Failed to fetch extension, trying 4 more times
Failed to fetch extension, trying 4 more times
Failed to fetch extension, trying 3 more times
Failed to fetch extension, trying 3 more times`

please tell me solving solutions ...

Hi,
I have some problem with a blank released app (it works on dev) and before writing an issue, I want to investigate a little but the advices on the first post seems to be outdated.
What are the tricks in this version to have a more verbose prod app? I tried the DEBUG_PROD=true but it's only installing the extensions btw the redux one is not working

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Got this when run yarn for the first time, and also after a while, when adding a new project with yarn add.
Fixed it using npm install:

error [email protected]: The engine "node" is incompatible with this module. Expected version ">= 6.9.0 <7.0.0 || >= 8.9.0"

node version 8.3.0
npm version 5.3.0
yarn version 1.7.0
windows 8.1 x64
electron-react-boilerplate version 0.14.0

> cross-env HOT=1 NODE_ENV=development electron -r babel-register -r babel-polyfill ./app/main.renderer

Failed to fetch extension, trying 4 more times
Failed to fetch extension, trying 4 more times
Failed to fetch extension, trying 3 more times
Failed to fetch extension, trying 3 more times`

please tell me solving solutions ...

I had the same problem

The links under "Debugging Release Builds" are returning 404 errors

@mattrosendin thanks for pointing this out! Just update the comment

Was this page helpful?
0 / 5 - 0 ratings

Related issues

garetmckinley picture garetmckinley  ·  26Comments

williamoliveira picture williamoliveira  ·  25Comments

amilajack picture amilajack  ·  24Comments

pronebird picture pronebird  ·  30Comments

jefffriesen picture jefffriesen  ·  40Comments