Electron-forge: Failed to locate custom template: "typescript-webpack" due to old create-electron-app

Created on 21 Feb 2020  Â·  2Comments  Â·  Source: electron-userland/electron-forge

Issue Details

  • Electron Forge Version:

    • I do not know.

  • Electron Version:

    • I do not know.

  • Operating System:

    • Windows 10 (1903) x64

Expected Behavior

I'd like to initialize a simple project using Webpack + Typescript. I've read the docs and use the yarn create electron-app my-new-app --template=typescript-webpack for it.

Actual Behavior

I'm getting the following error:

C:\Users\reebr\Desktop\repo> yarn create electron-app mndg --template=typescript-webpack
yarn create v1.21.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

success Installed "[email protected]" with binaries:
      - create-electron-app
√ Initializing Project Directory
√ Initializing Git Repository
√ Copying Starter Files
√ Initializing NPM Module
√ Installing NPM Dependencies
× Locating custom template: "typescript-webpack"

An unhandled error has occurred inside Forge:
Failed to locate custom template: "typescript-webpack"

Try `npm install -g @electron-forge-template-typescript-webpack`
Error: Failed to locate custom template: "typescript-webpack"

Try `npm install -g @electron-forge-template-typescript-webpack`
    at C:\Users\reebr\AppData\Local\Yarn\Data\global\node_modules\@electron-forge\core\src\api\init-scripts\init-custom.ts:36:21
error Command failed.
Exit code: 1
Command: C:\Users\reebr\AppData\Local\Yarn\bin\create-electron-app
Arguments: mndg --template=typescript-webpack
Directory: C:\Users\reebr\Desktop\repo
Output:

info Visit https://yarnpkg.com/en/docs/cli/create for documentation about this command.

To Reproduce

Just execute the command from documentation.

Question

Most helpful comment

Try running yarn global remove create-electron-app and retrying. You probably have an old version of create-electron-app installed.

All 2 comments

Try running yarn global remove create-electron-app and retrying. You probably have an old version of create-electron-app installed.

@malept thank U.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Skizu picture Skizu  Â·  5Comments

pkinnucan picture pkinnucan  Â·  4Comments

liamdawson picture liamdawson  Â·  4Comments

chenzhiguo picture chenzhiguo  Â·  5Comments

Andreybest picture Andreybest  Â·  3Comments