Skip to content

Commit

Permalink
fix(generic): throw an error when there is no node_modules folder in …
Browse files Browse the repository at this point in the history
…the project

ISSUES CLOSED: #615
  • Loading branch information
malept committed Jan 2, 2019
1 parent 8b290d6 commit 9e18ad9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/util/rebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ import rebuild from 'electron-rebuild';
import asyncOra from '../util/ora-handler';

export default async (buildPath, electronVersion, platform, arch, config = {}) => {
if (!electronVersion) {
throw new Error("Could not determine Electron version. Make sure that 'npm install' (or 'yarn') has been run before invoking electron-forge.");
}

await asyncOra('Preparing native dependencies', async (rebuildSpinner) => {
const rebuilder = rebuild(Object.assign({}, config, {
buildPath,
Expand Down

0 comments on commit 9e18ad9

Please sign in to comment.