Closed polarathene closed 5 years ago
Repeat above process, but also run:
npm install --save styled-components styled-modern-normalize babel-plugin-styled-components bluebird google-tts-api lodash moize react-icons
Then:
$ electron-forge start
✔ Checking your system
✔ Locating Application
✔ Preparing native dependencies
✔ Launching Application
App threw an error during load
ReferenceError: Unknown plugin "react-hot-loader/babel" specified in "base" at 2, attempted to resolve relative to "/storage/projects/forge/read-aloud/src"
at /storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
at Array.map (<anonymous>)
at Function.normalisePlugins (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at OptionManager.init (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at BabelCompiler.compileSync (/storage/projects/forge/read-aloud/node_modules/electron-compilers/lib/js/babel.js:81:26)
at CompilerHost.compileUncachedSync (/storage/projects/forge/read-aloud/node_modules/electron-prebuilt-compile/node_modules/electron-compile/lib/compiler-host.js:669:27)
A JavaScript error occurred in the main process
Uncaught Exception:
// Exact repeat of the above output
and with DEBUG:
DEBUG=electron-forge:* electron-forge start
WARNING: DEBUG environment variable detected. Progress indicators will be sent over electron-forge:lifecycle
electron-forge:lifecycle Process Started: Checking your system +0ms
electron-forge:lifecycle Process Succeeded: Checking your system +348ms
electron-forge:runtime-config setting key: verbose to value: false +0ms
WARNING: DEBUG environment variable detected. Progress indicators will be sent over electron-forge:lifecycle
electron-forge:lifecycle Process Started: Locating Application +0ms
electron-forge:project-resolver searching for project in: /storage/projects/forge/read-aloud +0ms
electron-forge:project-resolver electron-forge compatible package.json found in /storage/projects/forge/read-aloud/package.json +8ms
electron-forge:lifecycle Process Succeeded: Locating Application +9ms
electron-forge:lifecycle Process Started: Preparing native dependencies +7ms
electron-forge:lifecycle Process Succeeded: Preparing native dependencies +1s
electron-forge:hook could not find hook: generateAssets +0ms
electron-forge:lifecycle Process Started: Launching Application +2ms
electron-forge:lifecycle Process Succeeded: Launching Application +9ms
App threw an error during load
ReferenceError: Unknown plugin "react-hot-loader/babel" specified in "base" at 2, attempted to resolve relative to "/storage/projects/forge/read-aloud/src"
at /storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/options/option-manager.js:180:17
at Array.map (<anonymous>)
at Function.normalisePlugins (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/options/option-manager.js:158:20)
at OptionManager.mergeOptions (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/options/option-manager.js:234:36)
at OptionManager.init (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
at File.initOptions (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/index.js:212:65)
at new File (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/file/index.js:135:24)
at Pipeline.transform (/storage/projects/forge/read-aloud/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
at BabelCompiler.compileSync (/storage/projects/forge/read-aloud/node_modules/electron-compilers/lib/js/babel.js:81:26)
at CompilerHost.compileUncachedSync (/storage/projects/forge/read-aloud/node_modules/electron-prebuilt-compile/node_modules/electron-compile/lib/compiler-host.js:669:27)
A JavaScript error occurred in the main process
Uncaught Exception:
I'm thinking by going over my package.json and the react template package.json in this repo, that it's really not clear what this template is doing that's making it a React template?
It's not pulling in React at all? react-hot-loader/babel
is mentioned here though(.compilerc) and I guess is where the error is stemming from? I see react was installed in node_modules, and I guess that file is where it's requesting react dependencies as I don't see them anywhere else?
react-hot-loader/babel
, if this is referring to relative path in node_modules directory, there is no babel folder there, it's living in lib, so react-hot-loader/lib/babel
.
Is one of my dependencies causing this breakage for some reason? If so is it due to something out of date with this template(babel perhaps?). I haven't added my own code yet just added packages.
Uh, the template is completely broken and the repository has not been updated in 2 years. Is this project dead?
@rrodriguezreche I had a much better time with electron-builder, I'd suggest that over forge tbh.
Not sure if its related but I get this error:
version 5.2.4 of electron-forge
I don't think I need to say too much about this as below info should be enough? Fresh React template is raising this error on start, I have another one after installing a few node modules(from a different electron react project that works fine that did not use forge), that raises a different error.
I've compared it to initializing a project without the React template specified, there are some differences (mainly the React project pulls in an extra babel plugin for es2015 classes, and .compilerc specifies electron 1.6 vs no templates 4.0). Perhaps the template is just out of date?
Any other info you'd like?
*Console output when you run
electron-forge init
with the environment variable `DEBUG=electron-forge:`. (Instructions on how to do so here). Please include the stack trace if one exists.**What command line arguments are you passing?
Followed [official site template instructions(]https://electronforge.io/templates) for React
What does your
config.forge
data inpackage.json
look like?