javascript - Timeout after gulp serve command -


i'm new in reactjs , gulp... .

i have problem gulp. problem when write gulp serve in terminal, in browser, page doesn't show , page doesn't load , after long time loading status, browser show me:

this webpage not available

err_connection_timed_out

message.

i don't know whats problem?

my package.json is:

{   "name": "projectoverview",   "version": "1.0.0",   "description": "",   "main": "gulpfile.js",   "scripts": {     "test": "echo \"error: no test specified\" && exit 1",     "start": "gulp serve"   },   "author": "",   "license": "mit",   "devdependencies": {     "react": "^0.13.2",     "gulp-react": "^3.0.1",     "gulp": "^3.8.11",     "gulp-connect": "^2.2.0",     "gulp-concat": "^2.5.2",     "gulp-open": "^0.3.2",     "gulp-browserify": "^0.5.1",     "reactify": "^1.1.0"   } } 

and config gulpfile.js follow:

var gulp = require('gulp'),     connect = require('gulp-connect'),     open = require("gulp-open"),     browserify = require('gulp-browserify'),     concat = require('gulp-concat'),     port = process.env.port || 3031;  gulp.task('browserify', function(){   gulp.src('./app/src/js/components/main.js')       .pipe(browserify({ transform: 'reactify' }))       .pipe(gulp.dest('./app/dist/js')); });  //launch browser in part gulp.task('open', function(){   var options = {     url: 'http://localhost:' + port,   };   gulp.src('./app/index.html')       .pipe(open('',options)); });  //live reload server gulp.task('connect', function(){   connect.server({     root: 'app',     port: port,     livereload: true   }); });  //live reload js gulp.task('js', function(){   gulp.src('./app/dist/**/*.js')       .pipe(connect.reload()); });  //live reload html gulp.task('html', function(){   gulp.src('./app/*.html')       .pipe(connect.reload()); });  //watch files live reload gulp.task('watch', function(){   gulp.watch('app/dist/js/*.js', ['js']);   gulp.watch('app/index.html', ['html']);   gulp.watch('app/src/js/**/*.js', ['browserify']); });  gulp.task('default', ['browserify']);  gulp.task('serve', ['browserify', 'connect', 'open', 'watch']); 

enter image description here

note test project , main.js file empty , contain pragma:

/** @jsx react.dom */ 

and should show ddddd message, if load. think problem in paths set in index.html or gulpfile.js. but...

my problem solved!

my mistake 2 part:

1. must run 2 command before calling gulp serve: first: gulp , after that, npm i in terminal.

2. kerio vpn enable during test. after disconnecting vpn account, works perfect! think kerio application , gulp port, has conflict... .


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -