Electron-forge: Template React & React+TypeScript

Created on 18 Dec 2017  路  5Comments  路  Source: electron-userland/electron-forge

  • [x] I have read the contribution documentation for this project.
  • [x] I agree to follow the code of conduct that this project follows, as appropriate.
  • [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

The two templates React & React+TypeScript got the same error when using electron-forge start but not the others.

It seems to be related to electron-devtools-installer but it's visible only on those two templates.

SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at Object.<anonymous> (/Users/davidroman/Business/forks/my-new-type/node_modules/electron-devtools-installer/dist/index.js:42:16)
    at Object.<anonymous> (/Users/davidroman/Business/forks/my-new-type/node_modules/electron-devtools-installer/dist/index.js:122:3)
    at Module._compile (module.js:569:30)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/davidroman/Business/forks/my-new-type/node_modules/electron-compile/lib/require-hook.js:77:14)
    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)

What command line arguments are you passing?


What does your config.forge data in package.json look like?

Basic ones from the template Rect & React+TypeScript

To reproduce, i just have to use the init command with the correct template : react or typescript

electron-forge init my-new-typescript --template=react-typescript
or
electron-forge init my-new-react --template=react

Just start the projet and I hope someone will have the same error.

The other templates are working.

Does I'm the only one ?

Most helpful comment

@davidroman0O I just fixed this in electron-devtools-installer, if you re-init or just update the electron-devtools-installer dep to 2.2.3 it should work fine 馃憤

All 5 comments

@davidroman0O I just fixed this in electron-devtools-installer, if you re-init or just update the electron-devtools-installer dep to 2.2.3 it should work fine 馃憤

Also, for future reference, please don't open duplicate issues. I gave a reason why I closed the original issue, and we could have continued the conversation in the original issue.

@MarshallOfSound I've just found it right now, i wanted to comment it but you did it first. Damn it, at 3 minutes of difference :p

@malept You didn't really understand my issue, it's not really a duplicate, there an issue with the React and React+TypeScript templates.

So, to fix it, do exactly what @MarshallOfSound comment !

The summary of this issue is exactly the same as #390, except you mentioned that it only happens with the react* templates. The reason why is also exactly the same (an issue with a dependency in just those templates). It would be preferred if the summary was edited to include new information, instead of creating a new issue.

@malept Alright! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

malept picture malept  路  4Comments

Skizu picture Skizu  路  5Comments

chenzhiguo picture chenzhiguo  路  5Comments

denn-s picture denn-s  路  3Comments

damianesteban picture damianesteban  路  3Comments