asadadams / simple-electron-react-boilerplate

Simple and minimal Electron + React Boilerplate
4 stars 0 forks source link

Unexpected token ... #2

Closed allthetime closed 4 years ago

allthetime commented 4 years ago

I'm getting this error when running npm start

I have the packager running.

> ElectronReactBoilerplate@0.0.1 start /Users/chris/todo
> electron .

App threw an error during load
/Users/chris/todo/node_modules/chokidar/index.js:904
  const options = {type: EV_ALL, alwaysStat: true, lstat: true, ...opts};
                                                                ^^^

SyntaxError: Unexpected token ...
    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 require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/chris/todo/node_modules/electron-reload/main.js:2:18)

it looks like babel is failing or something?

asadadams commented 4 years ago

After npm install , please try copying back the node_modules in the repo back to replace the ones installed, https://github.com/asadadams/simple-electron-react-boilerplate/tree/master/node_modules

allthetime commented 4 years ago

@asadadams

I did that; following the instructions.

Also, that seems like bad practice, why can't you just define the dependencies properly in package.json and not ship the example with an existing node_modules folder? It also makes me afraid of upgrading packages. There shouldn't be custom modifications of external libraries that could be overwritten.

asadadams commented 4 years ago

Will definitely do that

allthetime commented 4 years ago

@asadadams awesome. Thank you for being responsive. I'm really busy with work right now but I will probably continue to work on top of this later and might be able to help.

asadadams commented 4 years ago

@allthetime added dependencies to package.json and updated the README so try that out and let me know if the issue is solved when you are free. Thanks