React scripts not running onto devlopement environment -Openshift - openshift

I'm deploying my React, Node application onto openshift container platfrom.
I'm running the command concurrently at the backend. The backend runs perfectly with no issues. The frontend is causing the issues.
I'm running the command concurrently these are in package.json backend folder
"start": "node index.js",
"backend": "nodemon index.js",
"frontend": " npm run start --prefix ../frontend",
"frontendBuilt": "npm run built --prefix ../frontend",
"dev": "concurrently \"npm run backend\" \"npm run frontendBuilt\" ",
I've tried the following none is working
"frontend": " npm start --prefix /frontend",
"frontendBuilt": "npm built --prefix /frontend",
"frontend": " npm start --prefix ../frontend",
"frontendBuilt": "npm built --prefix ../frontend",
Following is the log text
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'dev' ]
2 info using npm#6.13.7
3 info using node#v12.2.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle changemaker#1.0.0~predev: changemaker#1.0.0
6 info lifecycle changemaker#1.0.0~dev: changemaker#1.0.0
7 verbose lifecycle changemaker#1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle changemaker#1.0.0~dev: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/backend/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle changemaker#1.0.0~dev: CWD: /backend
10 silly lifecycle changemaker#1.0.0~dev: Args: [ '-c', 'concurrently "npm run backend" "npm run frontend" ' ]
11 silly lifecycle changemaker#1.0.0~dev: Returned: code: 1 signal: null
12 info lifecycle changemaker#1.0.0~dev: Failed to exec dev script
13 verbose stack Error: changemaker#1.0.0 dev: `concurrently "npm run backend" "npm run frontend" `
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:196:13)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:196:13)
13 verbose stack at maybeClose (internal/child_process.js:1011:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:268:5)
14 verbose pkgid changemaker#1.0.0
15 verbose cwd /backend
16 verbose Linux 4.18.0-147.3.1.el8_1.x86_64
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
18 verbose node v12.2.0
19 verbose npm v6.13.7
20 error code ELIFECYCLE
21 error errno 1
22 error changemaker#1.0.0 dev: `concurrently "npm run backend" "npm run frontend" `
22 error Exit status 1
23 error Failed at the changemaker#1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
Starting the development server...
[1]
[1] The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
[1] npm ERR! frontend#0.1.0 start: `react-scripts start`
[1] npm ERR! Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the frontend#0.1.0 start script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR! /root/.npm/_logs/2020-02-13T07_34_21_726Z-debug.log
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
npm ERR! changemaker#1.0.0 frontend: ` npm start --prefix ../frontend`
[1] npm ERR! Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the changemaker#1.0.0 frontend script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR! /root/.npm/_logs/2020-02-13T07_34_21_744Z-debug.log
[1] npm run frontend exited with code 1
if I run npm run dev at openshift container backend folder works perfectly without any issues
Can anyone let me know as to where I'm going wrong?

Thanks, #jonrsharpe I'm serving the react from backend and deployed production build. A lil change in docker worked wonders. I've votes +1 to your comment

Related

how to solve npm error “npm ERR! errno 9009” at dev: `lite-server`

So, I was starting to learn bootstrap and for that I had to install and configure node & npm to run lite-server I've already created my .json file and installed lite server using command "npm install lite-server --save-dev" then after adding "dev": "lite-server" to the script of json file and try to run the command "npm run dev" then this error came in.
$ npm run dev
> bootstrapcourse#1.0.0 dev C:\Users\Shahir K\Desktop\bootstrapcourse
> lite-server
'"node"' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 9009
npm ERR! bootstrapcourse#1.0.0 dev: `lite-server`
npm ERR! Exit status 9009
npm ERR!
npm ERR! Failed at the bootstrapcourse#1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Shahir K\AppData\Roaming\npm-cache\_logs\2020-09-01T04_38_50_640Z-debug.log
can anyone explain this issue please I'll provide my json file and log file below
{
"name": "bootstrapcourse",
"version": "1.0.0",
"description": "first bootstrap course work to create package.jason \u001b[D\u001b[D\u001b[D\u001b[\u001b[C\u001b[C\u001b[son file",
"main": "index.html",
"scripts": {
"dev": "lite-server",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/shaheerk48/bootstrapworkrepo.git"
},
"author": "shahir",
"license": "ISC",
"bugs": {
"url": "https://github.com/shaheerk48/bootstrapworkrepo/issues"
},
"homepage": "https://github.com/shaheerk48/bootstrapworkrepo#readme",
"devDependencies": {
"lite-server": "^2.5.4"
}
}
log file ->
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli 'D:\\NODE\\node.exe',
1 verbose cli 'D:\\NODE\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'dev'
1 verbose cli ]
2 info using npm#6.14.6
3 info using node#v12.18.3
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle bootstrapcourse#1.0.0~predev: bootstrapcourse#1.0.0
6 info lifecycle bootstrapcourse#1.0.0~dev: bootstrapcourse#1.0.0
7 verbose lifecycle bootstrapcourse#1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle bootstrapcourse#1.0.0~dev: PATH: D:\NODE\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\Shahir K\Desktop\bootstrapcourse\node_modules\.bin;C:\Users\Shahir K\bin;D:\Git\mingw64\bin;D:\Git\usr\local\bin;D:\Git\usr\bin;D:\Git\usr\bin;D:\Git\mingw64\bin;D:\Git\usr\bin;C:\Users\Shahir K\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\Java\jdk-13.0.1\bin;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;D:\Git\cmd;.;C:\Program Files\Java\jdk-13.0.1\bin";C:\PHP7;D:\NODE;D:\NODE\node_modules\npm\bin;C:\Users\Shahir K\AppData\Local\Microsoft\WindowsApps;C:\Users\Shahir K\AppData\Local\Programs\Microsoft VS Code\bin;C:\MinGW\bin;C:\Users\Shahir K\AppData\Roaming\npm;D:\Git\usr\bin\vendor_perl;D:\Git\usr\bin\core_perl
9 verbose lifecycle bootstrapcourse#1.0.0~dev: CWD: C:\Users\Shahir K\Desktop\bootstrapcourse
10 silly lifecycle bootstrapcourse#1.0.0~dev: Args: [ '/d /s /c', 'lite-server' ]
11 silly lifecycle bootstrapcourse#1.0.0~dev: Returned: code: 9009 signal: null
12 info lifecycle bootstrapcourse#1.0.0~dev: Failed to exec dev script
13 verbose stack Error: bootstrapcourse#1.0.0 dev: `lite-server`
13 verbose stack Exit status 9009
13 verbose stack at EventEmitter.<anonymous> (D:\NODE\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack at EventEmitter.emit (events.js:315:20)
13 verbose stack at ChildProcess.<anonymous> (D:\NODE\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at ChildProcess.emit (events.js:315:20)
13 verbose stack at maybeClose (internal/child_process.js:1021:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
14 verbose pkgid bootstrapcourse#1.0.0
15 verbose cwd C:\Users\Shahir K\Desktop\bootstrapcourse
16 verbose Windows_NT 10.0.18363
17 verbose argv "D:\\NODE\\node.exe" "D:\\NODE\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
18 verbose node v12.18.3
19 verbose npm v6.14.6
20 error code ELIFECYCLE
21 error errno 9009
22 error bootstrapcourse#1.0.0 dev: `lite-server`
22 error Exit status 9009
23 error Failed at the bootstrapcourse#1.0.0 dev script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 9009, true ]
This error is specific to nodejs environment, you need to follow few steps to solve this, like
step 1 - clean npm cache, the npm cache self-heals from corruption issues and data extracted from the cache is guaranteed to be valid
npm cache clean --force
step 2 - delete node_modules and package-lock JSON, by deleting this it will remove the node_modules folder from your project.
rm -rf node_modules package-lock.json
step 3 - install dependencies again
npm install
step 4 - run your program
npm run dev

why npm install don't work in ubuntu 18.04

I'm try to install hooper fpr an vue.js example with this command:
$ npm install hooper
and show me the next error
npm ERR! file /home/juanlh/package.json
npm ERR! code EJSONPARSE
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected end of JSON input while parsing near ''
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/juanlh/.npm/_logs/2019-03-16T14_39_47_947Z-debug.log
The log:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', 'install', 'hooper' ]
2 info using npm#6.9.0
3 info using node#v8.10.0
4 verbose config Skipping project config: /home/juanlh/.npmrc. (matches userconfig)
5 verbose npm-session e3d2c58aee19e2f6
6 silly install loadCurrentTree
7 silly install readLocalPackageData
8 timing stage:rollbackFailedOptional Completed in 6ms
9 timing stage:runTopLevelLifecycles Completed in 124ms
10 verbose stack Error: Failed to parse json
10 verbose stack Unexpected end of JSON input while parsing near ''
10 verbose stack at parseError (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:452:11)
10 verbose stack at parseJson (/usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:104:26)
10 verbose stack at /usr/local/lib/node_modules/npm/node_modules/read-package-json/read-json.js:51:5
10 verbose stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:90:16
10 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
11 verbose cwd /home/juanlh
12 verbose Linux 4.18.0-16-generic
13 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "install" "hooper"
14 verbose node v8.10.0
15 verbose npm v6.9.0
16 error file /home/juanlh/package.json
17 error code EJSONPARSE
18 error JSON.parse Failed to parse json
18 error JSON.parse Unexpected end of JSON input while parsing near ''
19 error JSON.parse Failed to parse package.json data.
19 error JSON.parse package.json must be actual JSON, not just JavaScript.
20 verbose exit [ 1, true ]
The package.json was not create, i create it by myself and is empty.
An empty package.json is not valid json (and therefore not a valid package.json)
For example
$ echo -n > package.json
$ npm install left-pad
npm ERR! file /tmp/x/x/x/package.json
npm ERR! code EJSONPARSE
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected end of JSON input while parsing near ''
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/asottile/.npm/_logs/2019-03-16T16_28_09_404Z-debug.log
The minimum package.json to perform an install is {} (which is valid json: an empty map)
$ echo '{}' > package.json
$ npm install left-pad
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN x No description
npm WARN x No repository field.
npm WARN x No license field.
+ left-pad#1.3.0
added 1 package from 1 contributor and audited 1 package in 0.677s
found 0 vulnerabilities
You could also just delete package.json entirely:
$ rm -rf package.json node_modules
$ npm install left-pad
npm WARN saveError ENOENT: no such file or directory, open '/tmp/x/x/x/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/tmp/x/x/x/package.json'
npm WARN x No description
npm WARN x No repository field.
npm WARN x No README data
npm WARN x No license field.
+ left-pad#1.3.0

Error: Cannot find module '../lib/tslint-cli'

I am trying to create my first Firestore Cloud Function, and went through the Get Started directions. But when I try to deploy my Hello World script, I am getting the following error:
=== Deploying to 'myproject-dev'...
i deploying functions
Running command: npm --prefix "$RESOURCE_DIR" run lint
> functions# lint /Users/nlam/Dropbox/dev/myproject/backend/functions
> tslint --project tsconfig.json
module.js:549
throw err;
^
Error: Cannot find module '../lib/tslint-cli'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/nlam/Dropbox/dev/myproject/backend/functions/node_modules/.bin/tslint:3:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! functions# lint: `tslint --project tsconfig.json`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the functions# lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/nlam/.npm/_logs/2018-05-23T15_43_46_608Z-debug.log
Error: functions predeploy error: Command terminated with non-zero exit code1
My function is pretty simple:
import * as functions from 'firebase-functions';
export const helloworld = functions.https.onRequest((request, response) => {
response.send("hello, world");
});
And this is the contents of the log referenced above:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli '--prefix',
1 verbose cli '/Users/nlam/Dropbox/dev/myproject/backend/functions',
1 verbose cli 'run',
1 verbose cli 'lint' ]
2 info using npm#6.0.1
3 info using node#v8.11.1
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle functions#~prelint: functions#
6 info lifecycle functions#~lint: functions#
7 verbose lifecycle functions#~lint: unsafe-perm in lifecycle true
8 verbose lifecycle functions#~lint: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/nlam/Dropbox/dev/myproject/backend/functions/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
9 verbose lifecycle functions#~lint: CWD: /Users/nlam/Dropbox/dev/myproject/backend/functions
10 silly lifecycle functions#~lint: Args: [ '-c', 'tslint --project tsconfig.json' ]
11 silly lifecycle functions#~lint: Returned: code: 1 signal: null
12 info lifecycle functions#~lint: Failed to exec lint script
13 verbose stack Error: functions# lint: `tslint --project tsconfig.json`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:283:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:925:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid functions#
15 verbose cwd /Users/nlam/Dropbox/dev/myproject/backend
16 verbose Darwin 17.5.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "--prefix" "/Users/nlam/Dropbox/dev/myproject/backend/functions" "run" "lint"
18 verbose node v8.11.1
19 verbose npm v6.0.1
20 error code ELIFECYCLE
21 error errno 1
22 error functions# lint: `tslint --project tsconfig.json`
22 error Exit status 1
23 error Failed at the functions# lint script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
I tried installing tslint with:
sudo npm install -g tslint
but I still got the same error.
Any help would be appreciated. Thanks in advance.
Remove your node_modules directory and reinstall your node packages.
rm -rf node_modules
npm install
Can you try to type below code to your terminal?
tslint --project tsconfig.json
if it shows
no-unused-variable is deprecated. Since TypeScript 2.9. Please use the built-in compiler checks instead.
Then remove "no-unused-variable": {"severity": "warning"}, from your tslint.json file in your functions folder
if it shows something else, can you please post the error on here so we can take a look?

Webpack fails when run through npm run

I'm trying to setup React. When I try to run
npm run webpack -p
It gives the following error.
npm ERR! Linux 4.4.0-43-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "webpack" "-i"
npm ERR! node v6.8.1
npm ERR! npm v3.10.8
npm ERR! file /home/phani/test/package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Trailing comma in object at 9:3
npm ERR! },
npm ERR! ^
npm ERR! File: /home/phani/test/package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! /home/phani/test/npm-debug.log
And here is the error log,
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'webpack', '-i' ]
2 info using npm#3.10.8
3 info using node#v6.8.1
4 verbose stack Error: Failed to parse json
4 verbose stack Trailing comma in object at 9:3
4 verbose stack },
4 verbose stack ^
4 verbose stack at parseError (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:390:11)
4 verbose stack at parseJson (/usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:79:23)
4 verbose stack at /usr/lib/node_modules/npm/node_modules/read-package-json/read-json.js:48:5
4 verbose stack at /usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:78:16
4 verbose stack at tryToString (fs.js:455:3)
4 verbose stack at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:442:12)
5 verbose cwd /home/phani/test
6 error Linux 4.4.0-43-generic
7 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "webpack" "-i"
8 error node v6.8.1
9 error npm v3.10.8
10 error file /home/phani/test/package.json
11 error code EJSONPARSE
12 error Failed to parse json
12 error Trailing comma in object at 9:3
12 error },
12 error ^
13 error File: /home/phani/test/package.json
14 error Failed to parse package.json data.
14 error package.json must be actual JSON, not just JavaScript.
14 error
14 error This is not a bug in npm.
14 error Tell the package author to fix their package.json file. JSON.parse
15 verbose exit [ 1, true ]
I tried installing webpack globally. Still the error persist.
Npm doesn't recognize webpack as it's one of the dependencies, and not an NPM script.
If you installed webpack locally (the preferred method) - In your package.json add a script:
"scripts": {
"build": "webpack -p"
}
Then run it using npm run build.
If you want to use the globally installed webpack - run it using webpack -p (without npm run).

Getting error when trying to load node packages in package.json file

I executed this command to install packages & put its references in package.json file.
npm install gulp browserify gulp-browserify gulp-clean gulp-concat gulp-jshint gulp-util gulp-embedlr gulp-livereload tiny-lr connect-livereload express --save-dev
I am getting this error while launching this command:
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_mod
ules\\npm\\bin\\npm-cli.js" "install" "gulp" "browserify" "gulp-browserify" "gulp-clean" "
gulp-concat" "gulp-jshint" "gulp-util" "gulp-embedlr" "gulp-livereload" "tiny-lr" "connect
-livereload" "express" "--save-dev"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! file C:\wamp\www\Consult\package.json
npm ERR! code EJSONPARSE
npm ERR! Failed to parse json
npm ERR! Unexpected end of input
npm ERR! File: C:\wamp\www\Consult\package.json
npm ERR! Failed to parse package.json data.
npm ERR! package.json must be actual JSON, not just JavaScript.
npm ERR!
npm ERR! This is not a bug in npm.
npm ERR! Tell the package author to fix their package.json file. JSON.parse
npm ERR! Please include the following file with any support request:
npm ERR! C:\wamp\www\Consult\npm-debug.log
I am using windows machine with npm installed. This is my npm-debug.log file
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 'install',
1 verbose cli 'gulp',
1 verbose cli 'browserify',
1 verbose cli 'gulp-browserify',
1 verbose cli 'gulp-clean',
1 verbose cli 'gulp-concat',
1 verbose cli 'gulp-jshint',
1 verbose cli 'gulp-util',
1 verbose cli 'gulp-embedlr',
1 verbose cli 'gulp-livereload',
1 verbose cli 'tiny-lr',
1 verbose cli 'connect-livereload',
1 verbose cli 'express',
1 verbose cli '--save-dev' ]
2 info using npm#2.5.1
3 info using node#v0.12.0
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose stack Error: Failed to parse json
5 verbose stack Unexpected end of input
5 verbose stack at parseError (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:378:25)
5 verbose stack at parseJson (C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:85:51)
5 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\read-package-json\read-json.js:59:33
5 verbose stack at evalmachine.<anonymous>:336:14
5 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\graceful-fs\graceful-fs.js:102:5
5 verbose stack at FSReqWrap.oncomplete (evalmachine.<anonymous>:99:15)
6 verbose cwd C:\wamp\www\Consult
7 error Windows_NT 6.3.9600
8 error argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "gulp" "browserify" "gulp-browserify" "gulp-clean" "gulp-concat" "gulp-jshint" "gulp-util" "gulp-embedlr" "gulp-livereload" "tiny-lr" "connect-livereload" "express" "--save-dev"
9 error node v0.12.0
10 error npm v2.5.1
11 error file C:\wamp\www\Consult\package.json
12 error code EJSONPARSE
13 error Failed to parse json
13 error Unexpected end of input
14 error File: C:\wamp\www\Consult\package.json
15 error Failed to parse package.json data.
15 error package.json must be actual JSON, not just JavaScript.
15 error
15 error This is not a bug in npm.
15 error Tell the package author to fix their package.json file. JSON.parse
16 verbose exit [ 1, true ]
You seem to have a package.json file at C:\wamp\www\Consult\package.json.
The package.json file specifies which packages npm should install.
Since the file exists, npm defaults to using it but fails to parse the contents as JSON.
You can either fix the package.json file, or delete it and run your command again.
I recommend checking out this guide: https://docs.npmjs.com/getting-started/using-a-package.json
13 Failed to parse json
13 error Unexpected end of input
14 error File: C:\wamp\www\Consult\package.json
You have a typo/syntax error in C:\wamp\www\Consult\package.json file.