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.

'build' is not recognized as an internal or external command, operable program or batch file.

See original GitHub issue
  • Version: ^22.9.1
  • Electron Version: ^8.2.2
  • Electron Type (current, beta, nightly): ?
  • Target: linux,windows,mac but currently windows
{
  "name": "noriskclient-launcher-v2",
  "version": "0.0.5",
  "description": "Minecraft Launcher for NoRisk Client",
  "main": "./dist/main.js",
  "scripts": {
    "dev": "npm-run-all -p dev:react electron:serve",
    "dev:electron": "cross-env NODE_ENV=development webpack --config webpack/electron.webpack.js --mode development && npm run start:electron",
    "dev:react": "cross-env NODE_ENV=development webpack-dev-server --config webpack/react.webpack.js --mode development",
    "electron:serve": "wait-on http-get://localhost:4000/ && npm run dev:electron",
    "start:electron": "electron .",
    "publish": "build --win -p always",
    "build": "npm-run-all build:electron build:react",
    "build:run": "npm-run-all build start:electron",
    "build:electron": "webpack --config webpack/electron.webpack.js",
    "build:react": "webpack --config webpack/react.webpack.js",
    "package": "npm-run-all build package:dist",
    "package:dist": "electron-builder --dir",
    "test": "jest",
    "postinstall": "electron-builder install-app-deps",
    "pack": "electron-builder --dir",
    "dist": "electron-builder"
  },
  "keywords": [],
  "author": "NoRiskk",
  "license": "MIT",
  "devDependencies": {
    "@babel/core": "^7.9.0",
    "@babel/preset-env": "^7.9.5",
    "@babel/preset-react": "^7.9.4",
    "@babel/preset-typescript": "^7.9.0",
    "@commitlint/cli": "^9.0.1",
    "@commitlint/config-conventional": "^9.0.1",
    "@commitlint/core": "^9.0.1",
    "@testing-library/jest-dom": "^5.11.0",
    "@testing-library/react": "^10.4.3",
    "@types/electron-devtools-installer": "^2.2.0",
    "@types/jest": "^26.0.3",
    "@types/react": "^16.9.34",
    "@types/react-dom": "^16.9.6",
    "@types/styled-components": "^5.1.0",
    "@typescript-eslint/eslint-plugin": "^3.4.0",
    "@typescript-eslint/parser": "^3.4.0",
    "babel-core": "^6.26.3",
    "babel-loader": "^8.2.2",
    "babel-polyfill": "^6.26.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-stage-0": "^6.24.1",
    "commitizen": "^4.2.2",
    "cross-env": "^7.0.2",
    "cz-conventional-changelog": "3.2.0",
    "electron": "^8.2.2",
    "electron-builder": "^22.9.1",
    "electron-devtools-installer": "^3.1.0",
    "eslint": "^7.3.1",
    "eslint-config-prettier": "^6.11.0",
    "eslint-config-standard": "^14.1.1",
    "eslint-import-resolver-typescript": "^2.0.0",
    "eslint-plugin-import": "^2.22.0",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-prettier": "^3.1.4",
    "eslint-plugin-promise": "^4.2.1",
    "eslint-plugin-react": "^7.20.1",
    "eslint-plugin-standard": "^4.0.1",
    "html-webpack-plugin": "^4.2.0",
    "husky": "^4.2.5",
    "jest": "^26.1.0",
    "lint-staged": "^10.2.11",
    "npm-run-all": "^4.1.5",
    "prettier": "^2.0.5",
    "ts-jest": "^26.1.1",
    "typescript": "^3.9.5",
    "wait-on": "^5.2.1",
    "webpack": "^4.42.1",
    "webpack-cli": "^3.3.11",
    "webpack-dev-server": "^3.10.3"
  },
  "dependencies": {
    "@types/adm-zip": "^0.4.33",
    "@types/unzipper": "^0.10.3",
    "adm-zip": "^0.5.1",
    "electron-dl": "^3.0.2",
    "electron-fetch": "^1.7.2",
    "extract-zip": "^2.0.1",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "sha256-file": "^1.0.0",
    "styled-components": "^5.1.1",
    "unzipper": "^0.10.11"
  },
  "build": {
    "appId": "de.noriskclient.noriskclient-launcher-v2",
    "productName": "NoRisk Client",
    "publish": [
      {
        "provider": "github",
        "owner": "NoRiskClient",
        "repo": "noriskclient-launcher-v2"
      }
    ],
    "win": {
      "publish": [
        "github"
      ],
      "target": [
        {
          "target": "nsis",
          "arch": [
            "x64",
            "ia32"
          ]
        }
      ],
      "icon": "build/icon.ico"
    },
    "linux": {
      "target": [
        "AppImage",
        "deb"
      ]
    },
    "dmg": {
      "contents": [
        {
          "x": 110,
          "y": 150
        },
        {
          "x": 240,
          "y": 150,
          "type": "link",
          "path": "/Applications"
        }
      ]
    },
    "mac": {
      "category": "public.app-category.video"
    },
    "directories": {
      "output": "packages"
    },
    "files": [
      "package.json",
      "dist/**"
    ]
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/NoRiskClient/noriskclient-launcher-v2"
  },
  "config": {
    "commitizen": {
      "path": "./node_modules/cz-conventional-changelog"
    }
  },
  "lint-staged": {
    "*.{js,jsx,ts,tsx}": [
      "eslint --fix"
    ]
  }
}

After trying to publish yarn publish I’ll get this error

$ build --win -p always ‘build’ is not recognized as an internal or external command, operable program or batch file. error Command failed with exit code 1.

could you please help me?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
ficristocommented, Mar 20, 2021

Have you tried to use electron-builder instead of build for your publish script? "publish": "electron-builder --win -p always"

0reactions
ZinMinncommented, Dec 2, 2021

I also face this problem. "publish": "electron-builder --win -p always" command saved me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'build' is not recognized as an internal or external command
Failed at the myapp@1.0.0 dist script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above....
Read more >
5 Ways to Fix the "Not Recognized as an Internal or External ...
1. Verify if the Program Is Installed · 2. Use the Full File Path to Execute the Command · 3. Use the Full...
Read more >
How to Fix “not recognized as an internal or external ...
The “is not recognized as an internal command” error usually occurs because the computer can't find the executable that you're asking it to...
Read more >
how to fix is not recognized as an internal or ... - YouTube
how to fix is not recognized as an internal or external command, operable program or batch file.
Read more >
Error: 'Program is not recognized as an internal or external ...
"Program is not recognized as an internal or external command, operable program or batch file (9009)" (in GFI LanGuard 2014 R2 - build...
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