npm 8.5.5: unexected token in #npmcli\aborist - npm

after upgrading npm (via nvm) to 8.5.5 npm commands do not work anymore:
e.g. npm --verbose ls webpack fails with:
npm verb stack C:\Users\marti\AppData\Roaming\nvm\v16.15.0\node_modules\npm\node_modules\#npmcli\arborist:1
npm verb stack ../../workspaces/arborist
npm verb stack ^
npm verb stack
npm verb stack SyntaxError: Unexpected token '.'
npm verb stack at Object.compileFunction (node:vm:352:18)
npm verb stack at wrapSafe (node:internal/modules/cjs/loader:1033:15)
npm verb stack at Module._compile (node:internal/modules/cjs/loader:1069:27)
npm verb stack at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
npm verb stack at Module.load (node:internal/modules/cjs/loader:981:32)
npm verb stack at Function.Module._load (node:internal/modules/cjs/loader:822:12)
npm verb stack at Module.require (node:internal/modules/cjs/loader:1005:19)
npm verb stack at require (node:internal/modules/cjs/helpers:102:18)
npm verb stack at Object.<anonymous> (C:\Users\marti\AppData\Roaming\nvm\v16.15.0\node_modules\npm\lib\commands\ls.js:7:18)
npm verb stack at Module._compile (node:internal/modules/cjs/loader:1105:14)
npm verb cwd D:\dev\xxx
npm verb Windows_NT 10.0.19043
npm verb argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "--verbose" "ls" "webpack"
npm verb node v16.15.0
npm verb npm v8.5.5
npm ERR! Unexpected token '.'
Note: when I use nvm and switch back to node 16.12 (npm version 8.1.0) it works fine
Details
The file that the error refers to
C:\Users\xxx\AppData\Roaming\nvm\v16.15.0\node_modules\npm\node_modules\#npmcli\arborist contains only this (which is not valid js I guess):
../../workspaces/arborist
What I have tried (and did not work)
restarting my PC
uninstalling node 16.15 via nvm and reinstalling it
Workaround
delete the file C:\Users\xxx\AppData\Roaming\nvm\v16.15.0\node_modules\npm\node_modules\#npmcli\arborist
then copy the aborist directory from an older node version to that directory: e.g. from C:\Users\xxx\AppData\Roaming\nvm\v16.12.0\node_modules\npm\node_modules\#npmcli\arborist\
Any ideas what I am doing wrong? Or is this just a bug in npm 8.5.5

This worked for me:
updated nvm to version 1.1.9 (old installed version was 1.1.7)
then reinstalled node version 16.15.0 (now aborist is a directory) and the commands work as expected

Related

Npm install : FetchError: request to http://registry.npmjs.org/... failed, reason: read ECONNRESET

Trying to install any node package using npm hangs for about 5 mins then gives a ECONNRESET network error. I have been using npm for other projects recently and it worked fine but now will not work for any project(Including clean npm init)
npm i ws
This is on a Raspberry pi 3 running on my home network with no proxy requirements. All other machines both linux and windows are working fine.
npm -v = 6.4.1
I have tried the following:
npm i ws This gives me the ECONNRESET error (See below)
Curl https://registry.npmjs.org/
& Curl https://registry.npmjs.org/ws
Both return the correct json response
Removing any proxy settings
npm config rm proxy
npm config rm https-proxy
npm config set registry http://registry.npmjs.org/
Restarting etc
Full Error log:
npm i ws --save --verbose
npm info it worked if it ends with ok
npm verb cli [ '/home/pi/.nvm/versions/node/v8.16.0/bin/node',
npm verb cli '/home/pi/.nvm/versions/node/v8.16.0/bin/npm',
npm verb cli 'i',
npm verb cli 'ws',
npm verb cli '--save',
npm verb cli '--verbose' ]
npm info using npm#6.4.1
npm info using node#v8.16.0
npm verb npm-session 0a9bedb5def7f4a1
npm timing stage:rollbackFailedOptional Completed in 6ms
npm timing stage:runTopLevelLifecycles Completed in 1146975ms
npm verb type system
npm verb stack FetchError: request to http://registry.npmjs.org/ws failed, reason: read ECONNRESET
npm verb stack at ClientRequest.req.on.err (/home/pi/.nvm/versions/node/v8.16.0/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14)
npm verb stack at emitOne (events.js:116:13)
npm verb stack at ClientRequest.emit (events.js:211:7)
npm verb stack at Socket.socketErrorListener (_http_client.js:401:9)
npm verb stack at emitOne (events.js:116:13)
npm verb stack at Socket.emit (events.js:211:7)
npm verb stack at emitErrorNT (internal/streams/destroy.js:66:8)
npm verb stack at _combinedTickCallback (internal/process/next_tick.js:139:11)
npm verb stack at process._tickCallback (internal/process/next_tick.js:181:9)
npm verb cwd /home/pi/projects/picamera/node_server
npm verb Linux 4.19.37-v7+
npm verb argv "/home/pi/.nvm/versions/node/v8.16.0/bin/node" "/home/pi/.nvm/versions/node/v8.16.0/bin/npm" "i" "ws" "--save" "--verbose"
npm verb node v8.16.0
npm verb npm v6.4.1
npm ERR! code ECONNRESET
npm ERR! errno ECONNRESET
npm ERR! network request to http://registry.npmjs.org/ws failed, reason: read ECONNRESET
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm verb exit [ 1, true ]
npm timing npm Completed in 1148813ms
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2019-05-10T23_28_17_769Z-debug.log
First check following thing:
ping registry.npmjs.org
You will get to know the IP address from that like below:
PING registry.npmjs.org (104.16.20.35) 56(84) bytes of data.
Then
sudo vi /etc/hosts
104.16.20.35 registry.npmjs.org
Then try to do following
npm install

npm run dev causes errors on fresh laravel 5.6.x installation

I'm busy learning Laravel and run into a problem when i want to run npm run dev
First some background information:
Laravel version 5.6.22
npm version 6.01
node version 8.10.0
OS Ubuntu 18.4 LTS
PHP 7.2.5
Composer v 1.6.3
Executed steps:
Created a new laravel project sudo composer create-project --prefer-dist laravel/laravel npmtest
Grant all permissions (i'm aware of the security risks with 777 but did this just to test) sudo chmod -R 777 /var/www/npmtest
did a sudo composer install in the project root
followed by sudo npm install (already some error noticed)
Result of sudo npm install
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
> node-sass#4.9.0 install /var/www/npmtest/node_modules/node-sass
> node scripts/install.js
Unable to save binary /var/www/npmtest/node_modules/node-sass/vendor/linux-x64-57 : { Error: EACCES: permission denied, mkdir '/var/www/npmtest/node_modules/node-sass/vendor'
at Object.fs.mkdirSync (fs.js:885:18)
at sync (/var/www/npmtest/node_modules/mkdirp/index.js:71:13)
at Function.sync (/var/www/npmtest/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/var/www/npmtest/node_modules/node-sass/scripts/install.js:114:11)
at Object.<anonymous> (/var/www/npmtest/node_modules/node-sass/scripts/install.js:157: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)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/var/www/npmtest/node_modules/node-sass/vendor' }
> uglifyjs-webpack-plugin#0.4.6 postinstall /var/www/npmtest/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
> node-sass#4.9.0 postinstall /var/www/npmtest/node_modules/node-sass
> node scripts/build.js
Building: /usr/bin/node /var/www/npmtest/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/node',
gyp verb cli '/var/www/npmtest/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp#3.6.2
gyp info using node#8.10.0 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.15rc1\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.10.0
gyp verb command install [ '8.10.0' ]
gyp verb install input version string "8.10.0"
gyp verb install installing version: 8.10.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.10.0
gyp verb build dir attempting to create "build" dir: /var/www/npmtest/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/var/www/npmtest/node_modules/node-sass/build'
gyp ERR! System Linux 4.15.0-20-generic
gyp ERR! command "/usr/bin/node" "/var/www/npmtest/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/npmtest/node_modules/node-sass
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.9.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.9.0 postinstall 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! /home/roge/.npm/_logs/2018-05-18T13_53_01_126Z-debug.log
As i had no idea what to do with the errors and noticed that some of them go over permissions and permissions of node-modules where not 777, probably because executing npm install as root, i did:
sudo chmod -R 777 /var/www/npmtest again
followed by sudo npm install again
Result:
npm WARN deprecated gulp-util#3.0.8: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5
> node-sass#4.9.0 install /var/www/npmtest/node_modules/node-sass
> node scripts/install.js
Unable to save binary /var/www/npmtest/node_modules/node-sass/vendor/linux-x64-57 : { Error: EACCES: permission denied, mkdir '/var/www/npmtest/node_modules/node-sass/vendor'
at Object.fs.mkdirSync (fs.js:885:18)
at sync (/var/www/npmtest/node_modules/mkdirp/index.js:71:13)
at Function.sync (/var/www/npmtest/node_modules/mkdirp/index.js:77:24)
at checkAndDownloadBinary (/var/www/npmtest/node_modules/node-sass/scripts/install.js:114:11)
at Object.<anonymous> (/var/www/npmtest/node_modules/node-sass/scripts/install.js:157: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)
errno: -13,
code: 'EACCES',
syscall: 'mkdir',
path: '/var/www/npmtest/node_modules/node-sass/vendor' }
> uglifyjs-webpack-plugin#0.4.6 postinstall /var/www/npmtest/node_modules/webpack/node_modules/uglifyjs-webpack-plugin
> node lib/post_install.js
> node-sass#4.9.0 postinstall /var/www/npmtest/node_modules/node-sass
> node scripts/build.js
Building: /usr/bin/node /var/www/npmtest/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ '/usr/bin/node',
gyp verb cli '/var/www/npmtest/node_modules/node-gyp/bin/node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library=' ]
gyp info using node-gyp#3.6.2
gyp info using node#8.10.0 | linux | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` succeeded python2 /usr/bin/python2
gyp verb check python version `/usr/bin/python2 -c "import platform; print(platform.python_version());"` returned: "2.7.15rc1\n"
gyp verb get node dir no --target version specified, falling back to host node version: 8.10.0
gyp verb command install [ '8.10.0' ]
gyp verb install input version string "8.10.0"
gyp verb install installing version: 8.10.0
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.10.0
gyp verb build dir attempting to create "build" dir: /var/www/npmtest/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/var/www/npmtest/node_modules/node-sass/build'
gyp ERR! System Linux 4.15.0-20-generic
gyp ERR! command "/usr/bin/node" "/var/www/npmtest/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /var/www/npmtest/node_modules/node-sass
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass#4.9.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#4.9.0 postinstall 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! /home/roge/.npm/_logs/2018-05-18T13_53_01_126Z-debug.log
As i still could not find a solution for the errors, i tried to execute sudo npm run dev (and without sudo) what didn't work off course
result:
> # dev /var/www/npmtest
> npm run development
> # development /var/www/npmtest
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
module.js:549
throw err;
^
Error: Cannot find module '/var/www/npmtest/node_modules/laravel-mix/setup/webpack.config.js'
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 requireConfig (/var/www/npmtest/node_modules/webpack/bin/convert-argv.js:97:18)
at /var/www/npmtest/node_modules/webpack/bin/convert-argv.js:104:17
at Array.forEach (<anonymous>)
at module.exports (/var/www/npmtest/node_modules/webpack/bin/convert-argv.js:102:15)
at yargs.parse (/var/www/npmtest/node_modules/webpack/bin/webpack.js:171:41)
at Object.Yargs.self.parse (/var/www/npmtest/node_modules/yargs/yargs.js:533:18)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # development: `cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # development 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! /home/roge/.npm/_logs/2018-05-18T14_01_02_924Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # 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! /home/roge/.npm/_logs/2018-05-18T14_01_02_953Z-debug.log
After Google a few hours and trying:
https://github.com/JeffreyWay/laravel-mix/issues/533 and https://github.com/JeffreyWay/laravel-mix/issues/1072 and few more i have no idea where to continue.
For some magic reason is npm run dev working in one of my projects. Its the same Laravel version and i have really no idea what i did else there than in the (multiple) new projects i tried to get working...
Did i forget something or something wrong? Hope that someone can help me! Thanks in advance...
I solved the same problem
sudo apt-get install libpng-dev
npm install -g pngquant-bin

npm is failing to compile – uikit3

I've just started using UIKit3 (getuitkit.com) and I keep getting this error when npm run watch is running – I also can't use npm run compile either. Any ideas?
This is the error I get with watch...
[compile-less] /Users/Michael/Sites/uikit-3/build/icons.js:10
glob(custom, (err, folders) =>
^^
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
[compile-less] [nodemon] app crashed - waiting for file changes before starting...
And this for compile...
/Users/Michael/Sites/uikit-3/build/icons.js:10
glob(custom, (err, folders) =>
^^
SyntaxError: Unexpected token =>
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
npm ERR! Darwin 16.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "icons"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! uikit#3.0.0-beta.18 icons: `node build/icons`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the uikit#3.0.0-beta.18 icons script 'node build/icons'.
npm ERR! This is most likely a problem with the uikit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node build/icons
npm ERR! You can get their info via:
npm ERR! npm owner ls uikit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Michael/Sites/uikit-3/npm-debug.log
npm ERR! Darwin 16.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "compile-less"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! uikit#3.0.0-beta.18 compile-less: `npm run icons && node build/less`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the uikit#3.0.0-beta.18 compile-less script 'npm run icons && node build/less'.
npm ERR! This is most likely a problem with the uikit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run icons && node build/less
npm ERR! You can get their info via:
npm ERR! npm owner ls uikit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Michael/Sites/uikit-3/npm-debug.log
npm ERR! Darwin 16.1.0
npm ERR! argv "node" "/usr/local/bin/npm" "run" "compile"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! uikit#3.0.0-beta.18 compile: `npm run compile-less && npm run compile-js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the uikit#3.0.0-beta.18 compile script 'npm run compile-less && npm run compile-js'.
npm ERR! This is most likely a problem with the uikit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm run compile-less && npm run compile-js
npm ERR! You can get their info via:
npm ERR! npm owner ls uikit
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Michael/Sites/uikit-3/npm-debug.log
You seem to be running node v0.12.0. UIkit's build tools require a minimum version of 4.4+. Please update to a current Node version. https://nodejs.org/en/

Parse cloud code error for body-parser on npm start command

I have created the project for parse cloud code and now I am trying to start it using node.js
When I run start npm command it gives following error.
:\Project>npm start
> parse-server-example#1.4.0 start C:\Project
> node index.js
1
C:\Project\node_modules\express\lib\express.js:89
throw new Error('Most middleware (like ' + name + ') is no longer bundled
with Express and must be installed separately. Please see https://github.com/sen
chalabs/connect#middleware.');
^
Error: Most middleware (like bodyParser) is no longer bundled with Express and m
ust be installed separately. Please see https://github.com/senchalabs/connect#mi
ddleware.
at Function.Object.defineProperty.get (C:\Project\node_modules\express\lib\
express.js:89:13)
at Object.<anonymous> (C:\Project\cloud\plivo_receiver.js:6:16)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:\Project\cloud\main.js:6:1)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.3.0
npm ERR! npm v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! parse-server-example#1.4.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the parse-server-example#1.4.0 start script 'node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the parse-server-example
package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs parse-server-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls parse-server-example
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Project\npm-debug.log
As per the instruction in error I checked https://github.com/sen
chalabs/connect#middleware but could not understand the solution.
Error is being generated at following code of line.
app.use(express.bodyParser());
app.use(express.methodOverride());
Please let me know how to resolve this issue.
The issue is resolved.
I have used it in other way as below.
var bodyParser = require('body-parser')
var methodOverride = require('method-override')
var app = express();
app.use(bodyParser);
app.use(methodOverride);
I found the article here Body-parser Installation for bodyParser and have done similarly for methodOverride.
May be it will help someone and save his/her time.
Thank you

Error: Cannot find module 'browser-sync'

When am trying to start gulp serve
Its raise an error
module.js:338
throw err;
^
Error: Cannot find module 'browser-sync'
at Function.Module._resolveFilename (module.js:336:15)
at Function.Module._load (module.js:278:25)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/home/sajad/p_projects/my-project/gulpfile.js:17:19)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
After that i tried sudo npm rm browser-sync && npm install browser-sync
its raise follwing error
npm ERR! Linux 3.13.0-24-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "browser-sync"
npm ERR! node v0.12.7 npm ERR! npm v2.11.3 npm ERR! file
/home/sajad/.npm/escape-html/1.0.2/package/package.json npm ERR! code
EJSONPARSE
npm ERR! Failed to parse json npm ERR! No data, empty input at 1:1 npm
ERR! npm ERR! ^ npm ERR! File:
/home/sajad/.npm/escape-html/1.0.2/package/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/sajad/p_projects/my-project/npm-debug.log
Guide me how to start gulp serve and how resolve these error
I also had a same problem, I was able to solve it by entering this.
npm i browser-sync --save
Check this link here: https://github.com/brawlins/react-webpack-php-starter/issues/1
I tried these steps. Its work for me.
Globally install gulp.
Next need to install the project’s local dependencies (that’s where it’s looking for browser-sync). To do that,
cd into the project directory and run npm install.
Then try gulp serve.
You can also try following lines
npm i browser-sync --save then
npm start
You can try a :
npm cache clean
as it looks like it's not related to your project but your npm files,
and then re run npm install
Are you behind a proxy? Because it happened once to me in a company, this specific node module wouldn't be installed because of the proxy. I had to install it without proxy to make it work. Just try on your phone or another network.