Hi all,
I've recently run into an issue where I can't seem to get my code running.
The error (with debug output) is as follows:
Thu, 11 Jan 2018 21:57:04 GMT electron-compile:sanitize-paths Cache miss for cachedRealpath: 'D:\Users\Kishan\Documents\Projects\tara' => 'D:\Users\Kishan\Documents\Projects\tara'
App threw an error during load
D:\Users\Kishan\Documents\Projects\tara\src\renderer\index.js:7
import "@babel/polyfill"; // ES6 Polyfill
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at init (D:\Users\Kishan\Documents\Projects\tara\node_modules\electron-compile\lib\config-parser.js:294:16)
at main (D:\Users\Kishan\Documents\Projects\tara\node_modules\electron-prebuilt-compile\lib\es6-init.js:56:29)
I hypothesise (and please note that I am no expert) that the compiler is not transpiling the code correctly. Upon further investigation, when running the precompile command, that the compilers weren't found when they were called to be loaded (although this might not be related).
I have already:
Ran npm install
Updated all the babel packages to use the @babel scope
Tried packaging the application (I am using electron-forge), which seems to be failing to compile the JS with the error Cannot read property 'method' of undefined (although this might be an entirely separate issue).
Hi all, I've recently run into an issue where I can't seem to get my code running. The error (with debug output) is as follows:
I hypothesise (and please note that I am no expert) that the compiler is not transpiling the code correctly. Upon further investigation, when running the precompile command, that the compilers weren't found when they were called to be loaded (although this might not be related).
I have already:
npm install
@babel
scopeelectron-forge
), which seems to be failing to compile the JS with the errorCannot read property 'method' of undefined
(although this might be an entirely separate issue).My
.compilerc
is as follows:Any help will be appreciated. Please ask if you require any more information.
Thanks in advanced!