Questions regarding how to use electron or vue are likely to be closed as they are not direct issues with this boilerplate. Please seek solutions from official documentation or their respective communities.
# On a fresh install, I run npm run dev and it gives the following error:
SyntaxError: Unexpected token {
at Object../node_modules/electron-localshortcut/index.js (/Users/jbedford/Sites/lando-gui/dist/electron/main.js:249:1)
at __webpack_require__ (/Users/jbedford/Sites/lando-gui/dist/electron/main.js:21:30)
at eval (webpack:///./node_modules/electron-debug/index.js?:3:23)
at Object../node_modules/electron-debug/index.js (/Users/jbedford/Sites/lando-gui/dist/electron/main.js:177:1)
at __webpack_require__ (/Users/jbedford/Sites/lando-gui/dist/electron/main.js:21:30)
at eval (webpack:///./src/main/index.dev.js?:2:1)
at Object../src/main/index.dev.js (/Users/jbedford/Sites/lando-gui/dist/electron/main.js:505:1)
at __webpack_require__ (/Users/jbedford/Sites/lando-gui/dist/electron/main.js:21:30)
at eval (webpack:///multi_./src/main/index.dev.js_./src/main/index.js?:1:1)
at Object.0 (/Users/jbedford/Sites/lando-gui/dist/electron/main.js:528:1)
# Follow the instructions given to install and start this.
`# Install vue-cli and scaffold boilerplate
npm install -g vue-cli
vue init simulatedgreg/electron-vue my-project
cd my-project
yarn # or npm install
yarn run dev # or npm run dev`
I utilized npm install and npm run dev
I also encountered this Bug
try to this way: yarn add [email protected]
Works like a charm!
npm install [email protected]
@yangjiakun326 @derekzhan Does it ship with a broken version of electron-localshortcut or something?
It is now just giving another error: 'Process is not defined'
ERROR in Template execution failed: ReferenceError: process is not defined
ERROR in ReferenceError: process is not defined
- index.ejs:11 eval
[.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:11:2
- index.ejs:16 module.exports
[.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:16:3
- index.js:284
[lando-gui]/[html-webpack-plugin]/index.js:284:18
- task_queues.js:93 processTicksAndRejections
internal/process/task_queues.js:93:5
It is now just giving another error: 'Process is not defined'
ERROR in Template execution failed: ReferenceError: process is not defined ERROR in ReferenceError: process is not defined - index.ejs:11 eval [.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:11:2 - index.ejs:16 module.exports [.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:16:3 - index.js:284 [lando-gui]/[html-webpack-plugin]/index.js:284:18 - task_queues.js:93 processTicksAndRejections internal/process/task_queues.js:93:5
What is your node version?
It is now just giving another error: 'Process is not defined'
ERROR in Template execution failed: ReferenceError: process is not defined ERROR in ReferenceError: process is not defined - index.ejs:11 eval [.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:11:2 - index.ejs:16 module.exports [.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:16:3 - index.js:284 [lando-gui]/[html-webpack-plugin]/index.js:284:18 - task_queues.js:93 processTicksAndRejections internal/process/task_queues.js:93:5What is your node version?
6.13
It is now just giving another error: 'Process is not defined'
ERROR in Template execution failed: ReferenceError: process is not defined ERROR in ReferenceError: process is not defined - index.ejs:11 eval [.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:11:2 - index.ejs:16 module.exports [.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:16:3 - index.js:284 [lando-gui]/[html-webpack-plugin]/index.js:284:18 - task_queues.js:93 processTicksAndRejections internal/process/task_queues.js:93:5What is your node version?
6.13
I think you should change node version to 10.16.0
It is now just giving another error: 'Process is not defined'
ERROR in Template execution failed: ReferenceError: process is not defined ERROR in ReferenceError: process is not defined - index.ejs:11 eval [.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:11:2 - index.ejs:16 module.exports [.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:16:3 - index.js:284 [lando-gui]/[html-webpack-plugin]/index.js:284:18 - task_queues.js:93 processTicksAndRejections internal/process/task_queues.js:93:5What is your node version?
6.13
I think you should change node version to 10.16.0
I apologize. My NPM version is 6.13. My node version is v12.13.0.
It is now just giving another error: 'Process is not defined'
ERROR in Template execution failed: ReferenceError: process is not defined ERROR in ReferenceError: process is not defined - index.ejs:11 eval [.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:11:2 - index.ejs:16 module.exports [.]/[html-webpack-plugin]/lib/loader.js!./src/index.ejs:16:3 - index.js:284 [lando-gui]/[html-webpack-plugin]/index.js:284:18 - task_queues.js:93 processTicksAndRejections internal/process/task_queues.js:93:5What is your node version?
6.13
I think you should change node version to 10.16.0
I apologize. My NPM version is 6.13. My node version is v12.13.0.
never mind.you can try to change node version to 10.16.0
I also encountered the problem, and changing node version to 10.17 fix this
Changing node version to 10.16.0 worked
https://github.com/SimulatedGREG/electron-vue/issues/902#issuecomment-509932645
why do we need to downgrade if the current lts version is v12
Found in latest electron@8, the default for nodeIntegration changed from true to false. You can enable it:
new BrowserWindow({
webPreferences: {
nodeIntegration: true
}
})
Then you can run electron with Node12 or 13.
Most helpful comment
why do we need to downgrade if the current lts version is v12