Closed nrlquaker closed 5 years ago
@nrlquaker What version of npm
/ yarn
are you using?
@MarshallOfSound
npm -v
5.5.1
Having the exact same issue here. It also affects code completion in VS Code since it cannot find the "electron" module.
This happens because electron does not exist in the node_module folder. It does not seem to be required by electron-forge.
If I do npm install electron --save-dev
, it fixes the issue.
One way to fix it would be to include electron in the react-typescript template's devDependencies.
Any news?
same issue. would be great to have intellisense in VSCode and to get rid of the false error
severity: 'Error'
message: 'Cannot find module 'electron'.'
source: 'ts'
code: '2307'
@MarshallOfSound Have you given this any thought? Do you believe @kavengagne's solution can be used or is there another one that you are thinking about?
Please describe your issue: Running lint on newly created typescript+react template gives warnings:
*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?
What does your
config.forge
data inpackage.json
look like?Please provide either a failing minimal testcase (with a link to the code) or detailed steps to reproduce your problem.
Steps to reproduce: 1 . electron-forge init my-new-project --template=react-typescript
Installing electron package fixes this, but app works fine w/o. Just gives lint errors.