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.

sh: electron-builder: command not found

See original GitHub issue
  • Version: “electron-builder”: “^22.9.1”
  • Electron Version: “electron”: “^10.1.5”,
  • Electron Type (current, beta, nightly):
  • Target:

Problem Description: When i executenpm run pack

    "build": "react-scripts build",
    "dev": "concurrently \"wait-on http://localhost:3000 && electron .\" \"cross-env BROWSER=none npm start\"",
    "pack": "electron-builder --dir",
    "dist": "electron-builder",
    "prepack": "npm run build"

He has the following error: electron-builder错误

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11

github_iconTop GitHub Comments

2reactions
utyfuacommented, Nov 15, 2020

At first try to install globally

npm i -g electron-builder

And try again. If it doesn’t work then use npx in package.json.

    "pack": "npx electron-builder --dir",
1reaction
gschafracommented, Feb 2, 2021

We’re also getting this error (Command "electron-builder" not found) when trying to run electron-builder from within a package.json script ("electron:win-build": "yarn build:prod && electron-builder build --win --ia32"). Installing electron-builder globally in our case is NOT an acceptable solution (using CI infrastrukture). In particular, the electron-builder docs recommends installing the package locally (using yarn, see https://www.electron.build/#installation), providing the “runner” in the node_modules/.bin directory, which is searched for by yarn (and npm?) automatically. In my case, this problem occured on a win agent (with yarn v1.22.5) and after upgrading electron-builder from v22.8.1 -> v22.9.1, which caused the electron-builder runner missing in the node_modules/.bin directory after a clean yarn install (whereby I cannot exclude that the runner existing until then was an artifact of a previous update/install). Any help on this is very much appreciated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

electron with react error bin sh build command not found
a temporary solution that i found is removing node modules files and run npm install rm -rf node_modules npm install.
Read more >
Multi Platform Build - electron-builder
Build performed in parallel, so, it is highly recommended to not use npm task per platform (e.g. npm run dist:mac && npm run...
Read more >
Advanced Installation Instructions
The above command will run the current working directory with Electron. Note that any dependencies in your app will not be installed.
Read more >
sh electron-builder command not found
sh electron -builder command not found技术、学习、经验文章掘金开发者社区搜索结果。掘金是一个帮助开发者成长的社区,sh electron-builder command not found技术 ...
Read more >
Npm install command failing with message "could not find ...
And the node_modules folder is not created. My computer setup: Windows 10 - Version 21H1 build 19043.1165 NodeJS / NPM - v16.6.1 /...
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