Giter VIP home page Giter VIP logo

react-flux-starter-kit's Introduction

ARCHIVED: React with Flux Starter Kit

Building Applications with React and Flux on Pluralsight has been updated to use create-react-app and other more modern tooling. So this repo is no longer related to the course. So I'm marking this repo as archived for historical purposes.

This starter kit gives you the following:

  • React, React Router, and Flux for ultra-responsive UI development
  • Browserify bundling
  • jQuery with Bootstrap for styling
  • Gulp build that:
    • compiles JSX
    • lints JSX and JS via ESLint
    • bundles JS and CSS files
    • migrates the built app to the dist folder
    • runs a dev webserver
    • opens your browser at the dev URL
    • reloads the browser upon save

To get started:

  1. Install NodeJS
  2. Download this repo
  3. Open the command line of your choice and cd to the root directory of this repo on your machine
  4. npm install - Installs packages
  5. npm install -g gulp - Installs gulp globally. Why globally?
  6. gulp - Builds the project and opens your browser. Check here if you have issues.
  7. Navigate to http://localhost:9005/ if your browser doesn't open automatically.

You're now all set to follow along with the course!

Having Issues? Try this:

  1. If you have an .eslintrc file in your user directory, delete it.

Change Log

  • Aug 20, 2015 - Updated to use gulp-open 1.0.0 and browserify 11.0.1 since the course has been updated to use these versions.
  • Jan 23, 2016 - Fixed missing quotes around jQuery globals in .eslintrc.
  • Jan 12, 2017 - Added link to completed demo and updated demo that uses latest versions as of early 2017.
  • Feb 25, 2018 - Updated to work with Node 8.

react-flux-starter-kit's People

Contributors

bryant1410 avatar coryhouse avatar pedrocanterini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-flux-starter-kit's Issues

Lint Issue

After adding lint task, I get the following issue:

Error: Cannot find module 'eslint-config-defaults/configurations/eslint'.

I used the same versions you suggested in the video.

Please let me know what the issue is.

Transition abort typo

I think there is a typo at about 1:50 of the "Transitions" module where you have typed transition.about() instead of transition.abort().

This is a really excellent course Cory, very practical and real world thank you. Looking forward to your ES6 course once I finish this one.

npm start -s not working with forever

Hi Cory!

Thanks for amazing course on react redux.
I was trying to run npm install with forever package but it's failing with following errors:

node version v6.10.3
npm version 3.10.10
Command used :

  1. forever start -c "npm start" ./ in the folder where package.json exist.
    2.forever start -c "npm start" ./tools/srcServer.js

When i run command 1 :
data: :21102 - > [email protected] prestart /home/ubuntu/code/codeschool/NERM
data: :21102 - > babel-node tools/startMessage.js
data: :21102 - Starting app in dev mode...
data: :21102 - > [email protected] start /home/ubuntu/code/codeschool/NERM
data: :21102 - > npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/"
data: :21102 - ERROR: Task not found: "/home/ubuntu/code/codeschool/NERM/"
data: :21102 - npm ERR! Linux 4.4.0-1022-aws
data: :21102 - npm ERR! argv "/home/ubuntu/.nvm/versions/node/v6.10.3/bin/node" "/home/ubuntu/.nvm/versions/node/v6.10.3/bin/npm" "start" "/home/ubuntu/code/codeschool/NERM/"
data: :21102 - npm ERR! node v6.10.3
data: :21102 - npm ERR! npm v3.10.10
data: :21102 - npm ERR! code ELIFECYCLE
data: :21102 - npm ERR! [email protected] start: npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/"
data: :21102 - npm ERR! Exit status 1
data: :21102 - npm ERR!
data: :21102 - npm ERR! Failed at the [email protected] start script 'npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/"'.
data: :21102 - npm ERR! Make sure you have the latest version of node.js and npm installed.
data: :21102 - npm ERR! If you do, this is most likely a problem with the nerm package,
data: :21102 - npm ERR! not with npm itself.
data: :21102 - npm ERR! Tell the author that this fails on your system:
data: :21102 - npm ERR! npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/"
data: :21102 - npm ERR! You can get information on how to open an issue for this project with:
data: :21102 - npm ERR! npm bugs nerm
data: :21102 - npm ERR! Or if that isn't available, you can get their info via:
data: :21102 - npm ERR! npm owner ls nerm
data: :21102 - npm ERR! There is likely additional logging output above.
data: :21102 - npm ERR! Please include the following file with any support request:
data: :21102 - npm ERR! /home/ubuntu/code/codeschool/NERM/npm-debug.log
data: :21102 - error: Forever detected script exited with code: 1
data: :21102 - error: Script restart attempt #1
data: :21102 - > [email protected] prestart /home/ubuntu/code/codeschool/NERM
data: :21102 - > babel-node tools/startMessage.js
data: :21102 - Starting app in dev mode...
data: :21102 - > [email protected] start /home/ubuntu/code/codeschool/NERM
data: :21102 - > npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/"
data: :21102 - ERROR: Task not found: "/home/ubuntu/code/codeschool/NERM/"
data: :21102 - npm ERR! Linux 4.4.0-1022-aws
data: :21102 - npm ERR! argv "/home/ubuntu/.nvm/versions/node/v6.10.3/bin/node" "/home/ubuntu/.nvm/versions/node/v6.10.3/bin/npm" "start" "/home/ubuntu/code/codeschool/NERM/"
data: :21102 - npm ERR! node v6.10.3
data: :21102 - npm ERR! npm v3.10.10
data: :21102 - npm ERR! code ELIFECYCLE
data: :21102 - npm ERR! [email protected] start: npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/"
data: :21102 - npm ERR! Exit status 1
data: :21102 - npm ERR!
data: :21102 - npm ERR! Failed at the [email protected] start script 'npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/"'.
data: :21102 - npm ERR! Make sure you have the latest version of node.js and npm installed.
data: :21102 - npm ERR! If you do, this is most likely a problem with the nerm package,
data: :21102 - npm ERR! not with npm itself.
data: :21102 - npm ERR! Tell the author that this fails on your system:
data: :21102 - npm ERR! npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/"
data: :21102 - npm ERR! You can get information on how to open an issue for this project with:
data: :21102 - npm ERR! npm bugs nerm
data: :21102 - npm ERR! Or if that isn't available, you can get their info via:
data: :21102 - npm ERR! npm owner ls nerm
data: :21102 - npm ERR! There is likely additional logging output above.
data: :21102 - npm ERR! Please include the following file with any support request:
data: :21102 - npm ERR! /home/ubuntu/code/codeschool/NERM/npm-debug.log
data: :21102 - error: Forever detected script exited with code: 1
data: :21102 - error: Script restart attempt #2
data: :21102 - > [email protected] prestart /home/ubuntu/code/codeschool/NERM
data: :21102 - > babel-node tools/startMessage.js

errors when i run command 2 :

data: tools/srcServer.js:23101 - > [email protected] prestart /home/ubuntu/code/codeschool/NERM
data: tools/srcServer.js:23101 - > babel-node tools/startMessage.js
data: tools/srcServer.js:23101 - Starting app in dev mode...
data: tools/srcServer.js:23101 - > [email protected] start /home/ubuntu/code/codeschool/NERM
data: tools/srcServer.js:23101 - > npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/tools/srcServer.js"
data: tools/srcServer.js:23101 - ERROR: Task not found: "/home/ubuntu/code/codeschool/NERM/tools/srcServer.js"
data: tools/srcServer.js:23101 - npm ERR! Linux 4.4.0-1022-aws
data: tools/srcServer.js:23101 - npm ERR! argv "/home/ubuntu/.nvm/versions/node/v6.10.3/bin/node" "/home/ubuntu/.nvm/versions/node/v6.10.3/bin/npm" "start" "/home/ubuntu/code/codeschool/NERM/tools/srcServer.js"
data: tools/srcServer.js:23101 - npm ERR! node v6.10.3
data: tools/srcServer.js:23101 - npm ERR! npm v3.10.10
data: tools/srcServer.js:23101 - npm ERR! code ELIFECYCLE
data: tools/srcServer.js:23101 - npm ERR! [email protected] start: npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/tools/srcServer.js"
data: tools/srcServer.js:23101 - npm ERR! Exit status 1
data: tools/srcServer.js:23101 - npm ERR!
data: tools/srcServer.js:23101 - npm ERR! Failed at the [email protected] start script 'npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/tools/srcServer.js"'.
data: tools/srcServer.js:23101 - npm ERR! Make sure you have the latest version of node.js and npm installed.
data: tools/srcServer.js:23101 - npm ERR! If you do, this is most likely a problem with the nerm package,
data: tools/srcServer.js:23101 - npm ERR! not with npm itself.
data: tools/srcServer.js:23101 - npm ERR! Tell the author that this fails on your system:
data: tools/srcServer.js:23101 - npm ERR! npm-run-all --parallel test:watch open:src lint:watch "/home/ubuntu/code/codeschool/NERM/tools/srcServer.js"
data: tools/srcServer.js:23101 - npm ERR! You can get information on how to open an issue for this project with:
data: tools/srcServer.js:23101 - npm ERR! npm bugs nerm
data: tools/srcServer.js:23101 - npm ERR! Or if that isn't available, you can get their info via:
data: tools/srcServer.js:23101 - npm ERR! npm owner ls nerm
data: tools/srcServer.js:23101 - npm ERR! There is likely additional logging output above.
data: tools/srcServer.js:23101 - npm ERR! Please include the following file with any support request:
data: tools/srcServer.js:23101 - npm ERR! /home/ubuntu/code/codeschool/NERM/npm-debug.log
data: tools/srcServer.js:23101 - error: Forever detected script exited with code: 1
data: tools/srcServer.js:23101 - error: Script restart attempt #1
data: tools/srcServer.js:23101 - > [email protected] prestart /home/ubuntu/code/codeschool/NERM
data: tools/srcServer.js:23101 - > babel-node tools/startMessage.js

internal/fs error

Tushar:react-flux-starter-kit mr-woot$ gulp
module.js:472
throw err;
^

Error: Cannot find module 'internal/fs'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at evalmachine.:18:20
at Object. (/Users/mr-woot/Desktop/react-flux-starter-kit/node_modules/gulp/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:11:1)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)

No ESLint configuration found

After adding in the lint task, the following error occurred:

No ESLint configuration found

In order to address this issue, I had to switch line 66 in gulpfile.js from:
.pipe(lint({config: 'eslint.config.json'}))
to:
.pipe(lint({configFile: 'eslint.config.json'}))

Gulp not running (node 8 & 7)

Started off with the course, I really like the way Cory explains... but when it eventually came to setting up the environment I quickly ran into problems. I went to the github page to download the repo and only came to see the course is already 2 years old... that's a little disappointing :-(

Anyways, the first problem I ran into was this one:

react-flux-starter-kit-master  gulp
[09:46:53] Warning: gulp version mismatch:
[09:46:53] Global gulp is 3.9.1
[09:46:53] Local gulp is 3.9.0
module.js:487
    throw err;
    ^

Error: Cannot find module 'internal/fs'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Module.require (module.js:513:17)
    at require (internal/module.js:11:18)
    at evalmachine.<anonymous>:40:20
    at Object.<anonymous> (/Users/benromijn/react-flux-starter-kit-master/node_modules/gulp/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:11:1)
    at Module._compile (module.js:569:30)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:503:32)
    at tryModuleLoad (module.js:466:12)

But this was only a warning, I ran npm install gulp (so without the -g) and that solved the warning but not the problem:

~/react-flux-starter-kit-master gulp
module.js:472
    throw err;
    ^

Error: Cannot find module 'clone'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/benromijn/react-flux-starter-kit-master/node_modules/vinyl/index.js:2:13)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

I am currently on NPM v 5.0.3 and NODE 8.1.1

cant get gulp to run

Hey man thanks for pulling this great repo together. Trying to get this to work. Any ideas why i might be having a problem?

`$ gulp
[12:57:32] Using gulpfile ~/code/react-flux-starter-kit/gulpfile.js
[12:57:32] Starting 'html'...
[12:57:32] Finished 'html' after 7.27 ms
[12:57:32] Starting 'js'...
[12:57:32] Finished 'js' after 23 ms
[12:57:32] Starting 'css'...
[12:57:32] Finished 'css' after 15 ms
[12:57:32] Starting 'lint'...
[12:57:32] Starting 'connect'...
[12:57:32] Finished 'connect' after 10 ms
[12:57:32] Starting 'open'...
[12:57:32] Finished 'open' after 2.78 ms
[12:57:32] Starting 'watch'...
[12:57:32] Finished 'watch' after 13 ms
[12:57:32] Server started http://localhost:9005
[12:57:32] LiveReload started on port 35729

/Users/myusername/code/react-flux-starter-kit/node_modules/gulp-eslint/node_modules/eslint/lib/config.js:129
throw e;
^
YAMLException: Cannot read config file: /Users/myusername/code/react-flux-starter-kit/node_modules/eslint-config-airbnb/rules/react.js
Error: end of the stream or a document separator is expected at line 2, column 12:
'plugins': [
^
Referenced from: eslint-config-airbnb
Referenced from: /Users/myusername/.eslintrc
at generateError (/Users/myusername/code/react-flux-starter-kit/node_modules/js-yaml/lib/js-yaml/loader.js:162:10)
at throwError (/Users/myusername/code/react-flux-starter-kit/node_modules/js-yaml/lib/js-yaml/loader.js:168:9)
at readDocument (/Users/myusername/code/react-flux-starter-kit/node_modules/js-yaml/lib/js-yaml/loader.js:1508:5)
at loadDocuments (/Users/myusername/code/react-flux-starter-kit/node_modules/js-yaml/lib/js-yaml/loader.js:1544:5)
at load (/Users/myusername/code/react-flux-starter-kit/node_modules/js-yaml/lib/js-yaml/loader.js:1561:19)
at Object.safeLoad (/Users/myusername/code/react-flux-starter-kit/node_modules/js-yaml/lib/js-yaml/loader.js:1579:10)
at loadConfig (/Users/myusername/code/react-flux-starter-kit/node_modules/gulp-eslint/node_modules/eslint/lib/config.js:73:31)
at /Users/myusername/code/react-flux-starter-kit/node_modules/gulp-eslint/node_modules/eslint/lib/config.js:123:46
at Array.reduceRight (native)
at loadConfig (/Users/myusername/code/react-flux-starter-kit/node_modules/gulp-eslint/node_modules/eslint/lib/config.js:111:36)`

error 'Console' is not defined no-undef

I'm startin to following your class.
But I'm using Eslint 4.
After upgrading my Eslint config file as you did on your repo, when I run gulp I have the following error.

/home/laowai/dev/psadmin/src/main.js
2:11 error 'console' is not defined no-undef

✖ 1 problem (1 error, 0 warnings)

setState is async

Sorry to be back again but I think the call to toastr.success and transitionTo should be in a callback since setState is asynchronous. I could not work out why I kept getting the warning about leaving changes until I remembered from another course.

I think in the module React Forms/Transitions:3:35 I think the code should be something like:

  this.setState({dirty: false}, function() {
    toastr.success('Author saved.');
    this.transitionTo('authors');
  });

Again, great course thanks.

Outdated eslint config

I'd suggest updating the config file. The course itself is a bit outdated but that's a too big project to handle.
Yet, here are some of the things that can be updated instantly to make the pluralsight course go smoother:
update an .eslintrc.json file
update package.json with react-dom dependency that is now required

Cannot find module 'eslint-config-defaults/configurations/eslint'

Hi Cory,

I'm following your plural sight course step by step and I got into the following issue.

C:\lab\React\node_modules\eslint\lib\config.js:129
throw e;
^

Error: Cannot find module 'eslint-config-defaults/configurations/eslint'
Referenced from: C:\Users\azi.eslintrc
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at loadConfig (C:\lab\React\node_modules\eslint\lib\config.js:96:48)
at C:\lab\React\node_modules\eslint\lib\config.js:123:46
at Array.reduceRight (native)
at loadConfig (C:\lab\React\node_modules\eslint\lib\config.js:111:36)
at getPersonalConfig (C:\lab\React\node_modules\eslint\lib\config.js:194:18)
at getLocalConfig (C:\lab\React\node_modules\eslint\lib\config.js:238:55)

It seems running
npm install --save [email protected]
is it not enough I installed the following packages
npm install --save eslint eslint-config-defaults eslint-plugin-react babel-eslint
and now I'm getting

C:\lab\React\node_modules\gulp-eslint\node_modules\eslint\lib\eslint.js:642
throw ex;
^

TypeError: Error while loading rule 'react/display-name': ruleCreator is not a function
at C:\lab\React\node_modules\gulp-eslint\node_modules\eslint\lib\eslint.js:628:32
at Array.forEach (native)
at EventEmitter.module.exports.api.verify (C:\lab\React\node_modules\gulp-eslint\node_modules\eslint\lib\eslint.js:619:16)
at processText (C:\lab\React\node_modules\gulp-eslint\node_modules\eslint\lib\cli-engine.js:201:27)
at CLIEngine.executeOnText (C:\lab\React\node_modules\gulp-eslint\node_modules\eslint\lib\cli-engine.js:361:26)
at verify (C:\lab\React\node_modules\gulp-eslint\index.js:19:17)
at Transform._transform (C:\lab\React\node_modules\gulp-eslint\index.js:37:18)
at Transform._read (_stream_transform.js:167:10)
at Transform._write (_stream_transform.js:155:12)
at doWrite (_stream_writable.js:292:12)

Cheers,
Az

Error: Cannot find module 'eslint-config-defaults/configurations/eslint'

I made a clean download of the repo, ran the following:

npm install
gulp

and I got this:

C:\dev\tmp\react-flux-starter-kit\node_modules\gulp-eslint\node_modules\eslint\lib\config.js:129
                    throw e;
                    ^

Error: Cannot find module 'eslint-config-defaults/configurations/eslint'
Referenced from: C:\Users\xxx\.eslintrc
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at loadConfig (C:\dev\tmp\react-flux-starter-kit\node_modules\gulp-eslint\node_modules\eslint\lib\config.js:96:48)
    at C:\dev\tmp\react-flux-starter-kit\node_modules\gulp-eslint\node_modules\eslint\lib\config.js:123:46
    at Array.reduceRight (native)
    at loadConfig (C:\dev\tmp\react-flux-starter-kit\node_modules\gulp-eslint\node_modules\eslint\lib\config.js:111:36)
    at getPersonalConfig (C:\dev\tmp\react-flux-starter-kit\node_modules\gulp-eslint\node_modules\eslint\lib\config.js:194:18)
    at getLocalConfig (C:\dev\tmp\react-flux-starter-kit\node_modules\gulp-eslint\node_modules\eslint\lib\config.js:238:55)

looks like as I have eslint already installed that it is trying to use my newer version of eslint and it's funky config.

Is there a way to tell it to use the local over global?

Gulp not live-reloading

Hello Cory,

took your course on pluralsight. My livereload on gulp isn't running and I've have to stop and start on CLI to rebuild whatever changes I've been making. Any idea why?

Thanks in advance.

ps. Another student had this problem link

'use strict'

var gulp = require('gulp')
var connect = require('gulp-connect') // Runs a local dev server
var open = require('gulp-open') // Open a URL in a web browser
var browserify = require('browserify') // Bundles JS
var reactify = require('reactify')  // Transforms React JSX to JS
var source = require('vinyl-source-stream') // Use conventional text streams with Gulp
var concat = require('gulp-concat') // Concatenates files

var config = {
  port: process.env.PORT || 9005,
  devBaseUrl: 'http://localhost',
  paths: {
    html: './src/*.html',
    js: [
      './src/main.js',
      './src/js/*.js'
    ],
    images: './src/images/*',
    css: [
      'node_modules/bootstrap/dist/css/bootstrap.min.css',
      'node_modules/bootstrap/dist/css/bootstrap-theme.min.css',
      'node_modules/toastr/toastr.css',
      './src/css/*.css'
    ],
    dist: './dist',
    mainJs: './src/main.js'
  }
}

// Start a local development server
gulp.task('connect', function () {
  connect.server({
    root: ['dist'],
    port: config.port,
    base: config.devBaseUrl,
    livereload: true
  })
})

gulp.task('open', ['connect'], function () {
  gulp.src('dist/index.html')
    .pipe(open({ uri: config.devBaseUrl + ':' + config.port + '/' }))
})

gulp.task('html', function () {
  gulp.src(config.paths.html)
    .pipe(gulp.dest(config.paths.dist))
    .pipe(connect.reload())
})

gulp.task('js', function () {
  browserify(config.paths.mainJs)
    .transform(reactify)
    .bundle()
    .on('error', console.error.bind(console))
    .pipe(source('bundle.js'))
    .pipe(gulp.dest(config.paths.dist + '/scripts'))
    .pipe(connect.reload())
})

gulp.task('css', function () {
  gulp.src(config.paths.css)
    .pipe(concat('bundle.css'))
    .pipe(gulp.dest(config.paths.dist + '/css'))
})

// Migrates images to dist folder
gulp.task('images', function () {
  gulp.src(config.paths.images)
    .pipe(gulp.dest(config.paths.dist + '/images'))
    .pipe(connect.reload())

  // publish favicon
  gulp.src('./src/favicon.ico')
        .pipe(gulp.dest(config.paths.dist))
})

gulp.task('watch', function () {
  gulp.watch(config.paths.html, ['html'])
  gulp.watch(config.paths.js, ['js'])
  gulp.watch(config.paths.css, ['css'])
})

gulp.task('default', ['html', 'js', 'css', 'images', 'open', 'watch'])

TypeError: dest.on is not a function

While working on module 2 section Demo: Browserify Configuration, the gulp tasks fails to start. The console logs the error

[17:37:08] Using gulpfile D:\Code\pluralsight\react\react-flux\gulpfile.js
[17:37:08] Starting 'html'...
[17:37:09] Finished 'html' after 23 ms
[17:37:09] Starting 'js'...
[17:37:09] 'js' errored after 23 ms
[17:37:09] TypeError: dest.on is not a function
at DestroyableTransform.Stream.pipe (internal/streams/legacy.js:30:8)
at Gulp. (D:\Code\pluralsight\react\react-flux\gulpfile.js:49:10)
at module.exports (D:\Code\pluralsight\react\react-flux\node_modules\orchestrator\lib\runTask.js:34:7)
at Gulp.Orchestrator._runTask (D:\Code\pluralsight\react\react-flux\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (D:\Code\pluralsight\react\react-flux\node_modules\orchestrator\index.js:214:10)
at D:\Code\pluralsight\react\react-flux\node_modules\orchestrator\index.js:279:18
at finish (D:\Code\pluralsight\react\react-flux\node_modules\orchestrator\lib\runTask.js:21:8)
at module.exports (D:\Code\pluralsight\react\react-flux\node_modules\orchestrator\lib\runTask.js:60:3)
at Gulp.Orchestrator._runTask (D:\Code\pluralsight\react\react-flux\node_modules\orchestrator\index.js:273:3)
at Gulp.Orchestrator._runStep (D:\Code\pluralsight\react\react-flux\node_modules\orchestrator\index.js:214:10)

converting this code to React 4?

Sorry, not an issue, but didnt know where else to post it. I have tried to do this course using React/Router 4 -- finally gave up, just too many differences, and I am a beginner with this stuff. Did anyone try to upgrade the source code? I gave up at the author form hydration section. Preventing routing away from a dirty form doesnt work either, although I have taken it pretty far. My source is here: https://github.com/alernerdev/psadmin if anyone is interested in continuing this.
THanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.