question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Built-in templates do not start

See original GitHub issue

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Electron Forge version

6.0.0-beta.70

Electron version

v21.2.0

Operating system

Windows 10 Version 21H1 Build 19043.2130

Last known working Electron Forge version

6.0.0-beta.65

Expected behavior

After running the following commands

yarn create electron-app test --template=webpack
cd test
npm run start

then the empty application should start.

Actual behavior

test>npm run start

test@1.0.0 start electron-forge start

√ Checking your system √ Locating Application

An unhandled rejection has occurred inside Forge: Error: package.json for app does not have any devDependencies

Electron Forge was terminated. Location: {}

Steps to reproduce

See above

Additional information

Running node_modules\.bin\electron-forge --version returns this:

√ Checking your system
 6.0.0-beta.70

However according to packages.json it’s beta.69 that’s installed.

{
  "name": "test",
  "productName": "test",
  "version": "1.0.0",
  "description": "My Electron application description",
  "main": ".webpack/main",
  "scripts": {
    "start": "electron-forge start",
    "package": "electron-forge package",
    "make": "electron-forge make",
    "publish": "electron-forge publish",
    "lint": "echo \"No linting configured\""
  },
  "keywords": [],
  "author": {
    "name": "cwellsx",
    "email": "cwellsx@example.com"
  },
  "license": "MIT",
  "devDependencies": {
    "@electron-forge/cli": "^6.0.0-beta.69",
    "@electron-forge/maker-deb": "^6.0.0-beta.69",
    "@electron-forge/maker-rpm": "^6.0.0-beta.69",
    "@electron-forge/maker-squirrel": "^6.0.0-beta.69",
    "@electron-forge/maker-zip": "^6.0.0-beta.69",
    "@electron-forge/plugin-webpack": "6.0.0-beta.69",
    "@vercel/webpack-asset-relocator-loader": "1.7.3",
    "css-loader": "^6.0.0",
    "electron": "21.2.0",
    "node-loader": "^2.0.0",
    "style-loader": "^3.0.0"
  },
  "dependencies": {
    "electron-squirrel-startup": "^1.0.0"
  }
}

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
erikiancommented, Oct 31, 2022

@VerteDinde I found the issue. When create-electron-app is installed, it installs forge as a dependency. When create-electron-app is run, it calls @electron-forge\cli\dist\electron-forge-init.js, which ultimately copies the package.json from create-electron-app’s package.json and runs npm install / yarn install.

In other words: the forge version you get depends on when create-electron-app was first run on your system. The same applies for any other dependencies, like @vercel/webpack-asset-relocator-loader as you can see in the comments above. Since @electron-forge/plugin-webpack is pinned in the package.json, that specific (and probably outdated) version is always installed.

When I run create-electron-app on npm instead of Yarn, I get beta-59. You’re getting the latest version because the computers you’re testing on never ran create-electron-app before.

1reaction
erikiancommented, Oct 31, 2022

No global electron-forge here:

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Built in templates missing - Microsoft Community
Download a template, then copy it to your local Templates folder: While holding down the Option key, click on the Go menu and...
Read more >
Built-in "Deploy a Windows Service" step template does not ...
The bug. The built-in "Deploy a Windows Service" step template does not stop the service prior to deploying nor start the service after...
Read more >
Built-in template tags and filters - Django documentation
This document describes Django's built-in template tags and filters. It is recommended that ... The escape and safe filters are not acceptable arguments....
Read more >
Built-in Templates - Hookmark
Hookmark contains a collection of built-in templates for use with the Hook to New… ⌃⌘N command. They are stored in the ~/Documents/Hook/templates/built-in ......
Read more >
Template a file out to a target host - Ansible Documentation
Templates are processed by the Jinja2 templating language. Documentation on the template ... When set to false symbolic links will not be followed....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found