jros
jros

Reputation: 854

Can't run "npm start" in git bash on one computer, but on another I can

I'm using Electron to design come applications on both my laptop and my desktop. To manage the code base between two different machines, I'm using Git. On my laptop, I'm able to run npm start in Git Bash, but on my desktop, I can't. The only piece of information I can think of to provide (though I have no clue if it's useful) is my package.json which exists on both machines:

{
  "name": "nbastatsapp",
  "version": "0.0.1",
  "description": "NBA stats app",
  "main": "index.js",
  "scripts": {
    "start": "electron ."
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/nbastatsapp/NBAStatsApp.git"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/nbastatsapp/NBAStatsApp/issues"
  },
  "homepage": "https://github.com/nbastatsapp/NBAStatsApp#readme",
  "devDependencies": {
    "electron-prebuilt": "^0.36.7"
  }
}

When I run npm start on my desktop's Git Bash, I get the following:

$ npm start

> [email protected] start E:\NBAStatsApp
> electron .

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

npm ERR! Windows_NT 10.0.10240
npm ERR! argv "E:\\nodejs\\node.exe" "E:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v4.2.6
npm ERR! npm  v2.14.12
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'electron .'.
npm ERR! This is most likely a problem with the nbastatsapp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron .
npm ERR! You can get their info via:
npm ERR!     npm owner ls nbastatsapp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     E:\NBAStatsApp\npm-debug.log

To avoid flooding the post, here is a link to the full output log from this error: http://textuploader.com/525d1

How do I enable using npm start in Git Bash on my desktop?

Upvotes: 0

Views: 1536

Answers (1)

Ana Betts
Ana Betts

Reputation: 74692

Install node.js on your computer and ensure it is in %PATH%

Upvotes: 1

Related Questions