jeudi 1 novembre 2018

Ran npm run start in Mac terminal got an ERR message

Hope someone can help with this. I was trying to run my protractor from my terminal for the 1st time and I got this error message.

The command I used was

npm run start

I had a look at my package.json script and that seems fine. Did I miss something?

note: 'xx' is nothing more than removing my name for confidentiality

npm.json file

{
  "name": "LocatorTraining",

  "dependencies": {

  "protractor":  "^5.4.1"

  },


  "scripts": {
    "webdriver-update": "./node_modules/.bin/webdriver-manager update",
    "webdriver-start": "./node_modules/.bin/webdriver-manager start",
    "protractor": "./node_modules/.bin/protractor configurations.js",
    "start": "npm run webdriver-manager update &&npm run webdriver-manager start"
  }

}

Message from terminal

xx$ npm run start
npm ERR! Darwin 17.7.0
npm ERR! argv "/Users/xx/.nvm/versions/node/v7.2.0/bin/node" "/Users/xx/.nvm/versions/node/v7.2.0/bin/npm" "run" "start"
npm ERR! node v7.2.0
npm ERR! npm  v3.10.9
npm ERR! path /Users/xx/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open '/Users/xx/package.json'
npm ERR! enoent ENOENT: no such file or directory, open '/Users/xx/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/xx/npm-debug.log

Aucun commentaire:

Enregistrer un commentaire