-2

I am trying to utilized node packages for the first time, the one I am trying to work with is from https://github.com/codingphasedotcom/Starter-Kit-2018 I have done everything in the readme.md file but I am getting an error every time I use the command npm run watch, I have pasted the debug log below. I'm on a windows computer if that matters. Thanks.

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'watch' ]
2 info using npm@5.6.0
3 info using node@v9.4.0
4 verbose run-script [ 'prewatch', 'watch', 'postwatch' ]
5 info lifecycle RockyBoy@1.0.0~prewatch: RockyBoy@1.0.0
6 info lifecycle RockyBoy@1.0.0~watch: RockyBoy@1.0.0
7 verbose lifecycle RockyBoy@1.0.0~watch: unsafe-perm in lifecycle true
8 verbose lifecycle RockyBoy@1.0.0~watch: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\JeArc\OneDrive\Projects\todo-app-html\node_modules\.bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\JeArc\AppData\Local\Microsoft\WindowsApps;C:\Users\JeArc\AppData\Local\atom\bin;C:\Users\JeArc\AppData\Local\GitHubDesktop\bin;C:\Users\JeArc\AppData\Roaming\npm
9 verbose lifecycle RockyBoy@1.0.0~watch: CWD: C:\Users\JeArc\OneDrive\Projects\todo-app-html
10 silly lifecycle RockyBoy@1.0.0~watch: Args: [ '/d /s /c', 'gulp' ]
11 silly lifecycle RockyBoy@1.0.0~watch: Returned: code: 1  signal: null
12 info lifecycle RockyBoy@1.0.0~watch: Failed to exec watch script
13 verbose stack Error: RockyBoy@1.0.0 watch: `gulp`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:285:16)
13 verbose stack     at EventEmitter.emit (events.js:160:13)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:160:13)
13 verbose stack     at maybeClose (internal/child_process.js:943:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid RockyBoy@1.0.0
15 verbose cwd C:\Users\JeArc\OneDrive\Projects\todo-app-html
16 verbose Windows_NT 10.0.15063
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch"
18 verbose node v9.4.0
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error RockyBoy@1.0.0 watch: `gulp`
22 error Exit status 1
23 error Failed at the RockyBoy@1.0.0 watch script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
https://i.stack.imgur.com/d0pT4.png

Here is my package.json file :

  "name": "RockyBoy",
  "version": "1.0.0",
  "description": "Super Cool Framework",
  "main": "index.js",
  "author": "joe santos garcia",
  "license": "MIT",
  "homepage": "http://rocky.codingphase.com/",
  "dependencies": {
    "axios": "^0.16.1",
    "babel-core": "^6.24.1",
    "babel-loader": "^6.4.1",
    "babel-preset-env": "^1.4.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-react": "^6.24.1",
    "babel-preset-stage-0": "^6.24.1",
    "browser-sync": "^2.18.8",
    "gulp": "^3.9.1",
    "gulp-autoprefixer": "^3.1.1",
    "gulp-babel": "^6.1.2",
    "gulp-concat": "^2.6.0",
    "gulp-eslint": "^3.0.1",
    "gulp-imagemin": "^3.0.3",
    "gulp-sass": "^2.3.2",
    "gulp-shell": "^0.6.3",
    "gulp-uglify": "^2.0.0",
    "gulp-watch": "^4.3.9",
    "html-webpack-plugin": "^2.28.0",
    "node-sass": "^4.5.2",
    "react": "^15.5.4",
    "react-dom": "^15.5.4",
    "react-redux": "^5.0.4",
    "react-router": "^4.1.1",
    "redux": "^3.6.0",
    "sass-loader": "^6.0.3",
    "standard": "^10.0.2",
    "webpack": "^2.5.1",
    "webpack-stream": "^3.2.0"
  }
  "scripts": {
    "bundle": "./node_modules/.bin/webpack",
    "production": "./node_modules/.bin/webpack -p",
    "watch": "gulp",
    "sass": "gulp styles",
    "js": "gulp webpack"
  },
  "devDependencies": {
    "babel-preset-stage-0": "^6.24.1"
  }
}
lavalade
  • 329
  • 2
  • 11
Jess_Archer
  • 11
  • 1
  • 3

1 Answers1

3

In your package.json file, you have something like this probably somewhere:

"scripts": {
   "start": "node server/index.js",
   "watch": "gulp 'something here'"
 }

Do change it to as:

"scripts": {
   "start": "node server/index.js",
   "watch": "gulp \"something here\""
}

This basically happens because windows can understand only double quotes, while in your script, something is written in single quote.

Note: it may also happen for some other reasons, i'll be able to help you better if you give me the package.json file here.

Himanshu Mittal
  • 584
  • 1
  • 6
  • 21