Git Product home page Git Product logo

pluralsight-redux-starter's Introduction

NOTE: This repo is archived.

This repo contains code from the previous version of Building Applications in React and Redux in ES6. For the latest code, see the exercise files on the course page on Pluralsight.

Get Started

  1. Install Node 6. Need to run multiple versions of Node? Use nvm or nvm-windows
  2. Clone this repository. - git clone https://github.com/coryhouse/pluralsight-redux-starter.git or download the zip
  3. Make sure you're in the directory you just created. - cd pluralsight-redux-starter
  4. Install Node Packages. - npm install
  5. Run the app. - npm start -s This will run the automated build process, start up a webserver, and open the application in your default browser. When doing development with this kit, this command will continue watching files all your files. Every time you hit save the code is rebuilt, linting runs, and tests run automatically. Note: The -s flag is optional. It enables silent mode which suppresses unnecessary messages during the build.
  6. Disable safe write in your editor to assure hot reloading works properly.
  7. Install React developer tools and Redux Dev Tools in Chrome.
  8. Having issues? See below.

Having Issues? Try these things first:

  1. Run npm install - If you forget to do this, you'll see this: babel-node: command not found.
  2. Make sure the path doesn't include any spaces, or install the latest version of eslint-watch which adds support for paths containing spaces: npm install [email protected]
  3. Make sure you're running the latest version of Node. Or, use Node 5.12.0 if you're having issues on Windows. Node 6 has issues on some Windows machines.
  4. Make sure files with names that begin with a dot (.babelrc, .editorconfig, .eslintrc) are copied to the project directory root. This is easy to overlook if you copy this repository manually.
  5. Don't run the project from a symbolic link. It will cause issues with file watches.
  6. Use path.resolve on all path references in both the dev and prod webpack.config. See this commit for an example.
  7. Delete any .eslintrc in your user directory and disable any ESLint plugin / custom rules within your editor since these will conflict with the ESLint rules defined in the course.
  8. On Windows? Open your console as an administrator. This will assure the console has the necessary rights to perform installs.
  9. Try using your OS's native command line instead of an editor's. For some people, an editor's command line configuration may cause issues.
  10. Ensure you do not have NODE_ENV=production in your env variables as it will not install the devDependencies. To check run this on the command line: set NODE_ENV. If it comes back as production, you need to clear this env variable.
  11. Make sure you're using the same imports as the course demo. I've seen some people import ES6 code from node_modules via different imports like import Route from "react-router/es6/Route"; and import IndexRoute from "react-router/es6/IndexRoute";. Don't do that. :) Use the exact imports I use in the course.
  12. Reference bundle.js with a leading slash or you'll get an unexpected token error on reload of deep links.
  13. Make sure you have a .babelrc file defined in the root, as provided in this repo. Without it, you'll get a Unexpected token import error.
  14. Nothing above work? Delete your node_modules folder and re-run npm install.

Production Dependencies

Dependency Use
babel-polyfill Polyfill for Babel features that cannot be transpiled
bootstrap CSS Framework
jquery Only used to support toastr
react React library
react-dom React library for DOM rendering
react-redux Redux library for connecting React components to Redux
react-router React library for routing
react-router-redux Keep React Router in sync with Redux application state
redux Library for unidirectional data flows
redux-thunk Async redux library
toastr Display messages to the user

Development Dependencies

Dependency Use
babel-cli Babel Command line interface
babel-core Babel Core for transpiling the new JavaScript to old
babel-loader Adds Babel support to Webpack
babel-plugin-react-display-name Add displayName to React.createClass calls
babel-preset-es2015 Babel preset for ES2015
babel-preset-react Add JSX support to Babel
babel-preset-react-hmre Hot reloading preset for Babel
babel-register Register Babel to transpile our Mocha tests
cheerio Supports querying DOM with jQuery like syntax - Useful in testing and build process for HTML manipulation
colors Adds color support to terminal
compression Add gzip support to Express
cross-env Cross-environment friendly way to handle environment variables
css-loader Add CSS support to Webpack
enzyme Simplified JavaScript Testing utilities for React
eslint Lints JavaScript
eslint-plugin-import Advanced linting of ES6 imports
eslint-plugin-react Adds additional React-related rules to ESLint
eslint-watch Add watch functionality to ESLint
eventsource-polyfill Polyfill to support hot reloading in IE
expect Assertion library for use with Mocha
express Serves development and production builds
extract-text-webpack-plugin Extracts CSS into separate file for production build
file-loader Adds file loading support to Webpack
jsdom In-memory DOM for testing
mocha JavaScript testing library
nock Mock HTTP requests for testing
npm-run-all Display results of multiple commands on single command line
open Open app in default browser
react-addons-test-utils Adds React TestUtils
redux-immutable-state-invariant Warn when Redux state is mutated
redux-mock-store Mock Redux store for testing
rimraf Delete files
style-loader Add Style support to Webpack
url-loader Add url loading support to Webpack
webpack Bundler with plugin system and integrated development server
webpack-dev-middleware Adds middleware support to webpack
webpack-hot-middleware Adds hot reloading to webpack

pluralsight-redux-starter's People

Contributors

bryant1410 avatar compumike08 avatar coryhouse avatar jonthenerd 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  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

pluralsight-redux-starter's Issues

syntax error found while attempting to run first version of "start" script

Node version: 6.9.1, 7.1.0, 5.12.0 (I've tried three times, with the same result each time)
npm version: 3.10.9
Operating system: Windows 7 Enterprise SP1
Command line used: npm start
IDE: IntelliJ IDEA 2016.2.4
Steps to reproduce: I've been following along with the video (Environment Setup/Create Start Script) and copy/pasting the code from the github repo.

I get this error when attempting to run "npm start"

image

I reviewed issue #30 but my problem is different.

Here is my npm-debug.log

npm-debug.log.txt

I ran npm install and there were no signs of any problems. This is the first snag I've run into.

Suggestions?

Can't successfully build production version

Course name:

Building Applications with React and Redux in ES6

Node version:
v6.3.1
npm version:
v3.10.3
Operating system:
Linux 3.13.0-93-generic
Command line used:
"/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
Steps to reproduce:

  • write code by example from video or copy files provided with course
  • see following errors in WebStorm terminal:
    /home/username/WebstormProjects/sample_reactjs/webpack.config.dev-compiled.js.map (1/0) ✖ 1:11 Parsing error: Unexpected token : /home/username/WebstormProjects/sample_reactjs/webpack.config.prod-compiled.js.map (1/0) ✖ 1:11 Parsing error: Unexpected token :
  • see build traceback with errors:
Your app has been compiled in production mode and written to /dist. It's ready to roll!

> [email protected] postbuild /home/username/WebstormProjects/sample_reactjs
> babel-node tools/distServer.js

events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::3000
    at Object.exports._errnoException (util.js:1012:11)
    at exports._exceptionWithHostPort (util.js:1035:20)
    at Server._listen2 (net.js:1252:14)
    at listen (net.js:1288:10)
    at Server.listen (net.js:1384:5)
    at EventEmitter.listen (/home/username/WebstormProjects/sample_reactjs/node_modules/express/lib/application.js:617:24)
    at Object.<anonymous> (distServer.js:18:5)
    at Module._compile (module.js:541:32)
    at loader (/home/username/WebstormProjects/sample_reactjs/node_modules/babel-register/lib/node.js:158:5)
    at Object.require.extensions.(anonymous function) [as .js] (/home/username/WebstormProjects/sample_reactjs/node_modules/babel-register/lib/node.js:168:7)

npm ERR! Linux 3.13.0-93-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "build"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! [email protected] postbuild: `babel-node tools/distServer.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postbuild script 'babel-node tools/distServer.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 react-redux-sample package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel-node tools/distServer.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs react-redux-sample
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls react-redux-sample
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/username/WebstormProjects/sample_reactjs/npm-debug.log

Windows hot reloading not working

Node version: v6.6.0

npm version: 3.10.8

Operating system: Windows 7

Command line used: Ctrl+S on a js file

Steps to reproduce: Download repository on Windows 7. npm install. npm start -s. Modify index.js + save

Error:
[HMR] The following modules couldn't be hot updated: (Full reload needed) This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See http://webpack.github.io/docs/hot-module-replacement-with-webpack.html for more details. process-update.js?e13e:89 [HMR] - ./src/index.js process-update.js?e13e:128 [HMR] Reloading page

How to make eslint work with modulesDirectories?

Node version: v6.9.1

npm version: v3.10.8

Operating system: mac os sierra

Command line used: npm start

Steps to reproduce:

Hey Cory,

I'm trying to work eslint work with WebPack modulesDirectories option as described here. However, eslint throws the following error and prevents webpack build

/Users/cihadturhan/Desktop/github/dashboard-react/src/client/App/components/NavbarApp.js (1/0)
  ✖  2:22  Unable to resolve path to module 'components/AppImage.js'  import/no-unresolved

Can you guide me how to make eslint work? Thanks in advance.

project setup issue after integrating test

I have posted the same question on pluralsight also:
I have recently started working on this course, but i got stuck with this error can you suggest what is the problem
redux

old repository link: https://github.com/EmraanSiddiqui/react-redux-mydemo

your answer:
@SiddiquiEmraan You're missing the .babelrc and .eslintrc. Easy to overlook. You can get those from the course exercise files.

new repository link with all necessary files:
https://github.com/EmraanSiddiqui/my-react-redux-demo

Node version:
v 0.12.2
npm version:
v 4.3.0
Operating system:
Windows 10 Home
Command line used:
windows command prompt
Steps to reproduce:

just clone this repository, run npm install then try npm test

Many lint warnings and error

Node version:
v6.3.1
npm version:
v3.10.3
Operating system:
Ubuntu 14.04 LTS
Command line used:
npm run build

Steps to reproduce:

Try to run production server and lint will show many (443) similar warnings for most js files and 1 error.
As a result bundle js is not creating and routing show index.html instead.
/home/username/WebstormProjects/sample_reactjs/webpack.config.dev-compiled.js (0/4) ! 7:1 Unexpected var, use let or const instead no-var ! 9:1 Unexpected var, use let or const instead no-var ! 11:1 Unexpected var, use let or const instead no-var ! 13:1 Unexpected var, use let or const instead no-var

/home/username/WebstormProjects/sample_reactjs/webpack.config.dev-compiled.js.map (1/0) ✖ 1:11 Parsing error: Unexpected token :

File webpack.config.dev-compiled.js.map starts with:
{"version":3,"sources":["webpack.config.dev.js"],"names":[],.....

where to find the components directory?

I followed your tutorials on pluralsight, in the session of Create init components. I saw you copy and paste HomePage.js and AboutPage.js. So may I know where can find them?
Thanks

some little omissions in the PluralSight course

  1. Add authorReducer to the rootReducer
  2. Add "import {browserHistory} from 'react-router';" to CoursesPage
  3. Add "this.saveCourse = this.saveCourse.bind(this);" to ManageCoursePage ctr

And I think the next one is an actual implementation bug:
4. courseActions#saveCourse checks id on course returned from API. Will always have id -> will always call "updateCourseSuccess". Should check on input course reference instead

I hope to finish the course this weekend, and I'll update here if I find anything else.

run lint: esw webpack.config

Node version:6.9.1

npm version:3.10.8

Operating system:Win 10

Command line used:npm run lint
image

Steps to reproduce:

I run the command npm run lint and get this issue with the esw script.

I've got esw.cmd and esw in /.bin folder but this script won't run

Why is it being run through esw rather than eslint?

Uncaught TypeError: Cannot read property 'map' of undefined

Node version: 6.2.0

npm version: 3.8.9

Operating system: Microsoft Windows 8.1 Professional v6.3.10586.494 x64

Command line used: cmd, bash

Steps to reproduce: when i add this code :

  const authorsFormattedForDropdown = state.authors.map(author => {
    return {
      value: author.id,
      text: author.firstName + ' ' + author.lastName
    };
  });

in file src\components\course\ManageCoursePage.js i have some error:

Uncaught TypeError: Cannot read property 'map' of undefined

i repeat by you. but you don't have this error on course. help me please?

npm start

Node version: 6.4.0, 5.12.0

npm version: 3.10.3

Operating system: 10.0.10586

Command line used: npm start

Steps to reproduce: Steps in Starter Kit

Hi Cory,

Tried to download and run demo, however, getting the following error. I tried the solutions in previous issues, however, no luck. Enclosed is the log.

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 'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]prestart: [email protected]
6 verbose lifecycle [email protected]
prestart: unsafe-perm in lifecycle true
7 verbose lifecycle [email protected]prestart: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\john\Redux-Startup\pluralsight-redux-starter-master\node_modules.bin;C:\Program Files\nodejs;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\ThinkPad\Bluetooth Software;C:\Program Files\ThinkPad\Bluetooth Software\syswow64;C:\ProgramData\Lenovo\ReadyApps;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files\Git\cmd;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Users\john.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\nodejs;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\john\AppData\Local\atom\bin;C:\Users\john\AppData\Roaming\npm
8 verbose lifecycle [email protected]
prestart: CWD: C:\Users\john\Redux-Startup\pluralsight-redux-starter-master
9 silly lifecycle [email protected]prestart: Args: [ '/d /s /c', 'babel-node tools/startMessage.js' ]
10 silly lifecycle [email protected]
prestart: Returned: code: 1 signal: null
11 info lifecycle [email protected]~prestart: Failed to exec prestart script
12 verbose stack Error: [email protected] prestart: babel-node tools/startMessage.js
12 verbose stack Exit status 1
12 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:242:16)
12 verbose stack at emitTwo (events.js:106:13)
12 verbose stack at EventEmitter.emit (events.js:191:7)
12 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
12 verbose stack at emitTwo (events.js:106:13)
12 verbose stack at ChildProcess.emit (events.js:191:7)
12 verbose stack at maybeClose (internal/child_process.js:852:16)
12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
13 verbose pkgid [email protected]
14 verbose cwd C:\Users\john\Redux-Startup\pluralsight-redux-starter-master
15 error Windows_NT 10.0.10586
16 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
17 error node v6.4.0
18 error npm v3.10.3
19 error code ELIFECYCLE
20 error [email protected] prestart: babel-node tools/startMessage.js
20 error Exit status 1
21 error Failed at the [email protected] prestart script 'babel-node tools/startMessage.js'.
21 error Make sure you have the latest version of node.js and npm installed.
21 error If you do, this is most likely a problem with the pluralsight-redux-starter package,
21 error not with npm itself.
21 error Tell the author that this fails on your system:
21 error babel-node tools/startMessage.js
21 error You can get information on how to open an issue for this project with:
21 error npm bugs pluralsight-redux-starter
21 error Or if that isn't available, you can get their info via:
21 error npm owner ls pluralsight-redux-starter
21 error There is likely additional logging output above.
22 verbose exit [ 1, true ]

Thanks..

Loading an image from my files.

I'm trying to load an image in a <img /> tag. But the address http://localhost:3000/img/logo.png serves me my app broken, and give me an error:

Warning: [react-router] Location "/img/logo.png" did not match any routes

How can I do this? Thank you!

image

run eslint error

Node version: v7.8.0

npm version: 4.5.0

Operating system: OSX El Capitan V 10.11.6

Command line used: npm run lint

Steps to reproduce: I'm in Setup ESLint lesson.

Error message:

> [email protected] lint /Users/leo/dev/react/coryhouse-exp
> esw webpack.config.* src tools

/Users/leo/dev/react/coryhouse-exp/webpack.config.dev.js (1/0)
  ✖  1:1  Parsing error: The keyword 'import' is reserved

/Users/leo/dev/react/coryhouse-exp/tools/srcServer.js (1/0)
  ✖  1:1  Parsing error: The keyword 'import' is reserved

/Users/leo/dev/react/coryhouse-exp/tools/startMessage.js (1/0)
  ✖  1:1  Parsing error: The keyword 'import' is reserved

✖ 3 errors (6:08:42 AM)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] lint: `esw webpack.config.* src tools`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] lint script 'esw webpack.config.* src tools'.
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 pluralsight-redux-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     esw webpack.config.* src tools
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pluralsight-redux-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls pluralsight-redux-starter
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/leo/.npm/_logs/2017-04-19T23_08_42_666Z-debug.log

About Redux and express the router to config

Node version:4.5

npm version:2.15.9

Operating system: windows 7

How are you doing. I would like to ask God to you. How to use Express and react after the framework using the router;

error using eslint-watch package

using the npm run lint command is encountering an error.

I'm running on a surface pro 3 under windows 10 pro 64bit(10.0, Build 10586)

Here is the npm-debug.log file that is generated:

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-script',
1 verbose cli 'lint' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prelint', 'lint', 'postlint' ]
5 info lifecycle [email protected]prelint: [email protected]
6 silly lifecycle [email protected]
prelint: no script for prelint, continuing
7 info lifecycle [email protected]lint: [email protected]
8 verbose lifecycle [email protected]
lint: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]lint: PATH: path omitted - ds
10 verbose lifecycle [email protected]
lint: CWD: C:\Users\dave.scheffing\source\actdux_orig
11 silly lifecycle [email protected]lint: Args: [ '/d /s /c', 'esw webpack.config.* src tools' ]
12 silly lifecycle [email protected]
lint: Returned: code: 1 signal: null
13 info lifecycle [email protected]~lint: Failed to exec lint script
14 verbose stack Error: [email protected] lint: esw webpack.config.* src tools
14 verbose stack Exit status 1
14 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:245:16)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at EventEmitter.emit (events.js:191:7)
14 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack at emitTwo (events.js:106:13)
14 verbose stack at ChildProcess.emit (events.js:191:7)
14 verbose stack at maybeClose (internal/child_process.js:850:16)
14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid [email protected]
16 verbose cwd C:\Users\dave.scheffing\source\actdux_orig
17 error Windows_NT 10.0.10586
18 error argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run-script" "lint"
19 error node v6.2.0
20 error npm v3.8.9
21 error code ELIFECYCLE
22 error [email protected] lint: esw webpack.config.* src tools
22 error Exit status 1
23 error Failed at the [email protected] lint script 'esw webpack.config.* src tools'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the pluralsight-redux-starter package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error esw webpack.config.* src tools
23 error You can get information on how to open an issue for this project with:
23 error npm bugs pluralsight-redux-starter
23 error Or if that isn't available, you can get their info via:
23 error npm owner ls pluralsight-redux-starter
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

npm start error

Node version: 6.3.0 and 5.12.0

npm version: 3.10.3

Operating system: windows 10

Command line used:

Steps to reproduce: npm install , npm start -s

module.js:442
throw err;
^

Error: Cannot find module './_baseClone'
at Function.Module._resolveFilename (module.js:440:15)
at Function.Module._load (module.js:388:25)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object. (C:\Users\Dung\Desktop\Demo\node_modules\babel-core\node_modules\babel-template\node_modules\lodash\cloneDeep.js:1:79)
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)

Not able to connect redux to react

Node version: v6.2.2

npm version:{ npm: '3.9.5',
ares: '1.10.1-DEV
http_parser: '2.7
icu: '57.1',
modules: '48',
node: '6.2.2',
openssl: '1.0.2h'
uv: '1.9.1',
v8: '5.0.71.52',
zlib: '1.2.8' }

Operating system: Windows

Command line used:
npm install
npm start -s

Steps to reproduce:
Stuck at below location.
https://app.pluralsight.com/player?course=react-redux-react-router-es6&author=cory-house&name=react-redux-react-router-es6-m7&clip=0&mode=live

For some reason I am getting an error Uncaught TypeError: Cannot read property 'courses' of undefined

home page itself gives this error

Missing files from course

Many of the files included in the react-redux-react-router-es6.zip downloaded from the Excercise files page of the course are missing from this repo. Not sure if this was intentional but I found it confusing after cloning the repo from Github and then finding that the files are missing when I got to the Initial App Structure chapter.

Typescript version

Hi, it Will be great if we can have this project config + Typescrip working.

_reactDom.render not a function? (Initial App Structure > Create Head)

Node version:6.9.2

npm version:4.0.3

Operating system: Mac OS X Yosemite

Command line used:npm install, npm start

Steps to reproduce: npm start

I was following the video and got stuck in the Initial App Structure > Create Head session. I got an error in the console
! 8:17 'children' is missing in props validation react/prop-types

Then I open my chome dev tool, I saw an error message "(0 , _reactDom.render) is not a function(…)".

This is my code, does anyone have any idea why the error is happening and how should I fix it?

import 'babel-polyfill';
import React from 'react';
import { render } from 'react-dom';
import { Router, browserHistory } from 'react-router';
import routes from './routes';
import './styles/styles.css'; //Webpack can import CSS files too!
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';


render(
   "<" Router history={browserHistory} routes={routes} /  ">"
  document.getElementById('app')
);

Hot Reloading Not Working

Node version: v.4.4.5 did try with v.6.2.2

npm version: for v.4.4.5 it is 2.15

Operating system: Ubuntu Linux

Command line used: Bash

Steps to reproduce: I am using the boilerplate code but when saving a file, it does not hot reload, nor does it show any change on reloading it manually. the error is as follows.

webpack built 0e2a67899c7fc7d25748 in 5658ms
{ [Error: watch src/components/common/Header.js___jb_tmp___ ENOSPC]
  code: 'ENOSPC',
  errno: 'ENOSPC',
  syscall: 'watch src/components/common/Header.js___jb_tmp___',
  filename: 'src/components/common/Header.js___jb_tmp___' }

src files used in PS course

Where can I find the "src" folder files pasted on the "Initial App Structure" module? (ex: AboutPage.js/HomePage.js content)

Bug in saveAuthor method of mockAuthorApi.js causes author.id to always be present, even during create actions

Node version: 4.4.7

npm version: 2.15.8

Operating system: Windows 7 (64-bit)

Command line used: Git BASH for Windows

Steps to reproduce: When you add the ability to add authors to the react/redux code, your saveAuthor method in this repository's mockAuthorApi.js file doesn't make a local copy of the author object passed into it before manipulating it. This causes saveAuthor to manipulate the author object in the "client-side" code directly. If you try to create a new author, when the saveAuthor method in mockAuthorApi.js is invoked it will generate and add an id to the author object. But since it is manipulating the author object directly, the id gets added to the "client-side" author object and causes the "client-side" code to always think you are doing an update instead of a create action.

Exit status 127 - This is most likely a problem with the pluralsight-redux-starter package not with npm itself.

sudo npm start

[email protected] prestart /home/jason/Documents/reacttest/pluralsight-redux-starter-master
babel-node tools/startMessage.js

/usr/bin/env: node: No such file or directory

npm ERR! [email protected] prestart: babel-node tools/startMessage.js
npm ERR! Exit status 127
npm ERR!
npm ERR! Failed at the [email protected] prestart script.
npm ERR! This is most likely a problem with the pluralsight-redux-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node tools/startMessage.js
npm ERR! You can get their info via:
npm ERR! npm owner ls pluralsight-redux-starter
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 4.2.0-16-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! cwd /home/jason/Documents/reacttest/pluralsight-redux-starter-master
npm ERR! node -v v0.10.25
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian

npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/jason/Documents/reacttest/pluralsight-redux-starter-master/npm-debug.log
npm ERR! not ok code 0

npm run build

When I run npm run build I get this error in the console:

Uncaught TypeError: (0 , s.default) is not a function(…)

and a blank page.

What am I doing wrong?

[Help] Accessing the state of another component

Node version: v6.0.0

npm version: v3.8.8

Operating system: Mac OsX El Captain

Command line used: npm start -s

Steps to reproduce:
I was able to follow the tutorial and successfully run the application with no issues. Now I tried integrating login component on my own. I'm storing username and loggedIn status in the reducer state designed for login. Once logged in, I'm showing the HomePage. I would like to show the list of courses written by the logged in user on the home page. I have mock api to return the list of courses for the given username.

From the action, I'm calling a mock get api to retrieve all courses written by user. I've the below component slightly modified. But I'm unable to retrieve the list of courses in the component. The console.log step in the componentDidMount() is giving me undefined. However, I'm getting the proper results on my action which actually triggers the mock api.

HomePage component

import React, {PropTypes} from 'react';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import * as courseActions from '../../actions/courseActions';
import CourseList from './CourseList';

class HomePage extends React.Component {
  constructor(props, context) {
    super(props, context);
    this.state = {
      courses: Object.assign({}, props.courses)
    };
  }

  componentDidMount() {
    this.props.actions.loadAllCoursesByUser(this.props.username)
      .then((courses) => {
        console.log(courses);
      })
      .catch(error => {
        throw(error);
      });
  }

  render() {
    return (
      <div className="container-fluid">
        <h1>Courses by me</h1>
      </div>
    );
  }
}

HomePage.propTypes = {
  username: PropTypes.string.isRequired,
  courses: PropTypes.object.isRequired,
  actions: PropTypes.object.isRequired
};

function mapStateToProps(state, ownProps) {
  return {
    username: state.user.username,
    courses: state.courses
  };
}

function mapDispatchToProps(dispatch) {
  return {
    actions: bindActionCreators(courseActions, dispatch)
  };
}

export default connect(mapStateToProps, mapDispatchToProps)(HomePage);

Action

export function loadAllCoursesByUser(username) {
  return (dispatch) => {
    return CouseApi.getCoursesByUser(username).then(courses => {
      console.log(courses);
      dispatch(loadAllCoursesByUserSuccess(courses));
    }).catch(error => {
      throw(error);
    });
  };
}

The console.log(courses) statement in the above statement returns me the expected result.

I may be doing something wrong here. Kindly help me out.

Loader cannot parse jsx

Node version: v6.2.2
npm version: v3.9.5
Operating system: windows 10

Steps to reproduce:
1 - Clone the repository
2 - Run npm install
3 - Create a simple react component on index.js:

import React from 'react';
import { render } from 'react-dom';

class Test extends React.Component{
render(){
return(


Testing!!!

);
}
}

render(
,
document.getElementById('app')
);

And get this error:
index.js Unexpected token (6:15)
You may need an appropriate loader to handle this file type.

I've revised your sample code and appearantly nothing is wrong, any clue?

colors library is not working

Node version: 6.10.0

npm version: 3.9.5

Operating system: windows 10

Command line used: Gitbash

Steps to reproduce:
screenshot 86

I want to display colored start message to my git bash command line screen, i am also doing the same steps described by you, install all the dependencies, but color is not changing of the startmessage, start message code is below

import colors from "colors"; /* eslint-disable no-console */ console.log("Starting App in Dev mode.....".green);

HMR fix for Windows (no page reload)

Hi,

These are the settings if you are interested in making HMR work on Windows:

.babelrc

{
  "presets": ["stage-2", "es2015", "react"],
  "plugins": [
    "react-hot-loader/babel",
    "transform-decorators-legacy",
    "typecheck",
    "syntax-flow",
    "transform-flow-strip-types",
    "transform-async-to-generator"
  ],
  "env": {
    "development": {
      "presets": ["react-hmre"]
    }
  }
}

srcServer.js

import express from 'express';
import webpack from 'webpack';
import favicon from 'serve-favicon';
import path from 'path';
import config from '../webpack.config.dev';
import open from 'open';

/* eslint-disable no-console */

const port = 3000;
const webPackPort = 3001;
const app = express();
const compiler = webpack(config);

app.use(require('webpack-dev-middleware')(compiler, {
  noInfo: true,
  publicPath: config.output.publicPath
}));

app.use(require('webpack-hot-middleware')(compiler));
app.use(favicon(__dirname + '/../src/assets/img/favicon.ico'));

app.get('*', function(req, res) {
  res.sendFile(path.join( __dirname, '../src/index.html'));
});

app.listen(port, function(err) {
  if (err) {
    console.log(err);
  } else {
    open(`http://localhost:${webPackPort}`);
  }
});

import WebpackDevServer from 'webpack-dev-server';

 new WebpackDevServer(webpack(config), {
    hot: true,
    historyApiFallback: true,
    proxy: {
      "*": "http://localhost:3000"
    }
 }).listen(3001, 'localhost', function (err, result) {
    if (err) {
      console.log(err);
    }
    console.log('Listening at localhost:3001');
 });

webpack.config.js

import webpack from 'webpack';
import path from 'path';

export default {
  debug: true,
  devtool: 'cheap-module-eval-source-map',
  noInfo: false,
  entry: [
    'babel-polyfill',
    'eventsource-polyfill', // necessary for hot reloading with IE
    //'webpack-hot-middleware/client?reload=true', //note that it reloads the page if hot module reloading fails.
    'react-hot-loader/patch',
    'webpack-dev-server/client?http://localhost:3001',
    'webpack/hot/only-dev-server',
    './src/index'
  ],
  target: 'web',
  output: {
    path: __dirname + '/dist', // Note: Physical files are only output by the production build task `npm run build`.
    publicPath: '/',
    filename: 'bundle.js'
  },
  devServer: {
    contentBase: './src'
  },
  plugins: [
    new webpack.HotModuleReplacementPlugin(),
    new webpack.NoErrorsPlugin()
  ],
  module: {
    loaders: [
      {test: /\.js$/, include: path.join(__dirname, 'src'), loaders: ['babel']},
      {test: /(\.css)$/, loaders: ['style', 'css']},
      {test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file"},
      {test: /\.(woff|woff2|png|jpe?g|gif|ico)(\?\S*)?$/, loader: 'url?limit=100000&name=[name].[ext]'},
      {test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=100000&mimetype=application/octet-stream"},
      {test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=100000&mimetype=image/svg+xml"}
    ]
  }
};

index.js:


[...]
import { AppContainer } from 'react-hot-loader';
import ProviderApp from './ProviderApp';

render(
  <AppContainer>
    <ProviderApp/>
  </AppContainer>,
  document.getElementById('app')
);

if (module.hot) {
  module.hot.accept('./ProviderApp', () => {
    const NextRoot = require('./ProviderApp').default;
    render(
      <AppContainer>
         <NextRoot/>
      </AppContainer>,
      document.getElementById('app')
    );
  });
}

Please feel free to delete this post if you are not interested in the subject.. :)
Anyway it took me 2-3 weeks to get here so I thaught it would be usefull to share the answer.. :)

babel-node not recognized as internal or external command

I'm following along the tutorial on PluralSight for React with ES6 and Redux. I'm using Visual Studio Code as my editoe. When I add babel-node in the start script, I get

babel-node not recognized as internal or external command

Any idea why?

Mocha test issue.

Node version: v0.12.2

npm version: 2.7.4

Operating system: Windows 8.1 Enterprise

Command line used: windows default cmd

Steps to reproduce: I was following your Pluralsight Video and when it was time to test the mocha tests I got the following error message:

9-30-2016 12-08-25 pm

code issue

Hi
it seem like code getting over-ridden, i dont see files at all as you explain in plural site videos for redux and react.
can you please recommit this course code?

Exit status 1: Failed at the [email protected] prestart script 'babel-node tools/startMessage.js'.

Node version:6.2.2

npm version:3.10.2

Operating system:10.11.5

Command line used:iTerm2

Steps to reproduce:npm install , npm start -s

0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle [email protected]~prestart: [email protected] 6 verbose lifecycle [email protected]~prestart: unsafe-perm in lifecycle true 7 verbose lifecycle [email protected]~prestart: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/michaelterry/Desktop/CurrentProjects/SoftwareDevelopement/CraftBeerApp/adminPannel/node_modules/.bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 8 verbose lifecycle [email protected]~prestart: CWD: /Users/michaelterry/Desktop/CurrentProjects/SoftwareDevelopement/CraftBeerApp/adminPannel 9 silly lifecycle [email protected]~prestart: Args: [ '-c', 'babel-node tools/startMessage.js' ] 10 silly lifecycle [email protected]~prestart: Returned: code: 1 signal: null 11 info lifecycle [email protected]~prestart: Failed to exec prestart script 12 verbose stack Error: [email protected] prestart:babel-node tools/startMessage.js 12 verbose stack Exit status 1 12 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:242:16) 12 verbose stack at emitTwo (events.js:106:13) 12 verbose stack at EventEmitter.emit (events.js:191:7) 12 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:40:14) 12 verbose stack at emitTwo (events.js:106:13) 12 verbose stack at ChildProcess.emit (events.js:191:7) 12 verbose stack at maybeClose (internal/child_process.js:852:16) 12 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5) 13 verbose pkgid [email protected] 14 verbose cwd /Users/michaelterry/Desktop/CurrentProjects/SoftwareDevelopement/CraftBeerApp/adminPannel 15 error Darwin 15.5.0 16 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 17 error node v6.2.2 18 error npm v3.10.2 19 error code ELIFECYCLE 20 error [email protected] prestart:babel-node tools/startMessage.js20 error Exit status 1 21 error Failed at the [email protected] prestart script 'babel-node tools/startMessage.js'. 21 error Make sure you have the latest version of node.js and npm installed. 21 error If you do, this is most likely a problem with the pluralsight-redux-starter package, 21 error not with npm itself. 21 error Tell the author that this fails on your system: 21 error babel-node tools/startMessage.js 21 error You can get information on how to open an issue for this project with: 21 error npm bugs pluralsight-redux-starter 21 error Or if that isn't available, you can get their info via: 21 error npm owner ls pluralsight-redux-starter 21 error There is likely additional logging output above. 22 verbose exit [ 1, true ]

courseApi.saveCourse fails with "TypeError: Cannot read property 'course' of undefined"

Node version: 5.5.0

npm version: 3.8.9

Operating system: OSX El Capitan, 10.11.2

Command line used: npm start -s

Steps to reproduce:

I'm stuck at this point: https://app.pluralsight.com/player?course=react-redux-react-router-es6&author=cory-house&name=react-redux-react-router-es6-m10&clip=11

For some reason the API call to the mockApi's saveCourse doesn't resolve successfully (it get's rejected and catched with the error mentioned in the subject)

Here's my saveCourse thunk:

export function saveCourse(course) {
    return function(dispatch, getState) { // thunk
        return courseApi.saveCourse(course).then(savedCourse => {

            console.log('returned course:', savedCourse);
            course.id ? dispatch(updateCourseSuccess(savedCourse)) : dispatch(saveCourseSuccess(savedCourse));
            console.log('course dispatched', savedCourse);
        }).catch(error => {
            console.error("An error occured:", error);
            //throw(error);
        });
    };
}

The save itself obviously fails as well. The weird thing is that according to the logs i added, it gets to "returned course", but never reaches "course dispatched"... so it appears the dispatch itself fails...

any ideas?

Error on routes.js file

Node version: 7.7.2

npm version: 4.1.2

Operating system: Ubuntu 16.04

Command line used: npm start -s

Steps to reproduce: Follow the course until "Create Header" chapter

I followed the pluralsight course and I got some errors in IDE (I'm using Visual Studio Code). I thougt it happened because I didn't set up some extensions to work with React and ES6, but when I ran the application (after create routes.js file), I got some errors and I couldn't run it.

ES Lint errors

/home/***/src/components/about/AboutPage.js (1/0)
  ✖  6:13  Parsing error: Unexpected token <

/home/***/src/components/App.js (1/0)
  ✖  6:13  Parsing error: Unexpected token <

/home/***/src/components/home/HomePage.js (1/0)
  ✖  7:13  Parsing error: Unexpected token <

/home/***/src/index.js (2/2)
  ✖  5:20  Parse errors in imported module './routes': Unexpected token < (8:5)  import/namespace
  ✖  5:20  Parse errors in imported module './routes': Unexpected token < (8:5)  import/default
  !  5:20  Parse errors in imported module './routes': Unexpected token < (8:5)  import/no-named-as-default
  !  5:20  Parse errors in imported module './routes': Unexpected token < (8:5)  import/no-named-as-default-member

/home/***/src/routes.js (1/0)
  ✖  8:5  Parsing error: Unexpected token <

/home/***/tools/srcServer.js (0/1)
  !  24:5  Unexpected console statement  no-console

Babel error

ERROR in ./src/routes.js
Module build failed: SyntaxError: /home/***/src/routes.js: Unexpected token (8:4)
   6 |
   7 | export default {
>  8 |     <Route path="/" component={App}>
     |     ^
   9 |         <IndexRoute component={HomePage} />
  10 |         <Rout path="about" component={AboutPage} />
  11 |     </Route>
    at Parser.pp$5.raise (/home/***/node_modules/babylon/lib/index.js:4373:13)
    at Parser.pp.unexpected (/home/***/node_modules/babylon/lib/index.js:1716:8)
    at Parser.pp$3.parseIdentifier (/home/***/node_modules/babylon/lib/index.js:4251:10)
    at Parser.pp$3.parsePropertyName (/home/***/node_modules/babylon/lib/index.js:4075:96)
    at Parser.parsePropertyName (/home/***/node_modules/babylon/lib/index.js:5999:23)
    at Parser.pp$3.parseObj (/home/***/node_modules/babylon/lib/index.js:3965:12)
    at Parser.pp$3.parseExprAtom (/home/***/node_modules/babylon/lib/index.js:3652:19)
    at Parser.parseExprAtom (/home/***/node_modules/babylon/lib/index.js:7016:22)
    at Parser.pp$3.parseExprSubscripts (/home/***/node_modules/babylon/lib/index.js:3427:19)
    at Parser.pp$3.parseMaybeUnary (/home/***/node_modules/babylon/lib/index.js:3407:19)
 @ ./src/index.js 13:14-33
ERROR: lint:watch: None-Zero Exit(1);

Routes.js

import React from 'react';
import { Route, IndexRoute } from 'react-router';
import App from './components/App';
import HomePage from './components/home/HomePage';
import AboutPage from './components/home/AboutPage';

export default {
    <Route path="/" component={App}>
        <IndexRoute component={HomePage} />
        <Rout path="about" component={AboutPage} />
    </Route>
};

API delete course not using correct property

Node version:

npm version:

Operating system:

Command line used:

Steps to reproduce: The current code uses const indexOfCourseToDelete = courses.findIndex(course => {
course.courseId == courseId;
});
But I think the actual property should just be "id" and not "courseId"

Warning: Failed Context Types: Required context `router` was not specified in `ManageCoursePage`.

Node version: 6.2.0

npm version: 3.8.9

Operating system: Microsoft Windows 8.1 Professional v6.3.10586.494 x64

Command line used: cmd, bash

Steps to reproduce: when i add this code :

When i create ManageCoursePage.test.js with this code:

import React from 'react';
import expect from 'expect';
import {mount, shallow} from 'enzyme';
import {ManageCoursePage} from './ManageCoursePage';

describe('Manage Course Page', () => {
  it('sets error message when trying to save empty title', () => {
    const props = {
      authors: [],
      actions: { saveCourse: () => { return Promise.resolve(); }},
      course: {id: '', watchHref: '', title: '', authorId: '', length: '', category: ''}
    };

    const wrapper = mount(<ManageCoursePage {...props}/>);
    const saveButton = wrapper.find('input').last();
    expect(saveButton.prop('type')).toBe('submit');
    saveButton.simulate('click');
    expect(wrapper.state().errors.title).toBe('Title must be at least 5 characters.');
  });
});

I run:

npm run test -- --watch

and i got this error:

Warning: Failed Context Types: Required context router was not specified in ManageCoursePage.

And you code work fine, but my same dosen't work well

Production build fails w/missing cheerio dependency

Node version: 4.6.0

npm version: 2.15.9

Operating system:
macOS Sierra

Command line used:
npm run build

Steps to reproduce:

  • Follow Pluralsight course
  • Skip Testing modules
  • Get to "Review Results" and do a "npm run build"
  • Observe that cheerio isn't present to build html.

index.js not getting loaded

nothing happens after loading the app.its just showing index.html without routes.I think problem is inside webpack

import webpack from 'webpack';
import path from 'path';

export default {
    debug: true,
    devtool: 'inline-source-map',
    noInfo: false,
    entry: [
        'eventsource-polyfill', // necessary for hot reloading with IE
        'webpack-hot-middleware/client?reload=true', //note that it reloads the page if hot module reloading fails.
        path.resolve(__dirname, 'src/index')
    ],
    target: 'web',
    output: {
        path: __dirname + '/dist', // Note: Physical files are only output by the production build task `npm run build`.
        publicPath: '/',
        filename: 'bundle.js'
    },
    devServer: {
        contentBase: path.resolve(__dirname, 'src')
    },
    plugins: [
        new webpack.HotModuleReplacementPlugin(),
        new webpack.NoErrorsPlugin()
    ],
    module: {
        loaders: [
            {test: /\.js$/, include: path.join(__dirname, 'src'), loaders: ['babel']},
            {test: /(\.css)$/, loaders: ['style', 'css']},
            {test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: 'file'},
            {test: /\.(woff|woff2)$/, loader: 'url?prefix=font/&limit=5000'},
            {test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=application/octet-stream'},
            {test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: 'url?limit=10000&mimetype=image/svg+xml'}
        ]
    }
};

I am using linux.
you may have a answer for this.thanks

npm start error: Failed at the [email protected] open:src script 'babel-node tools/srcServer.js'

Node version:
6.2.2
npm version:
3.9.5
Operating system:
Mac 10.11.5
Command line used:
npm start
Steps to reproduce:

  1. clone
  2. npm install
  3. npm start
  4. get error and see that i need to upgrade node from 5.x to 6.x so do that
  5. try again, get error and see issue suggesting deleting node_modules and rerunning npm install
  6. tried deleting and rerunning ``npm install`
  7. getting error below
Ryans-MacBook-Air:pluralsight-redux-starter ryanvice$ npm start

> [email protected] prestart /Users/ryanvice/Documents/Code/pluralsight-redux-starter
> babel-node tools/startMessage.js

Starting app in dev mode...

> [email protected] start /Users/ryanvice/Documents/Code/pluralsight-redux-starter
> npm-run-all --parallel test:watch open:src lint:watch


> [email protected] test:watch /Users/ryanvice/Documents/Code/pluralsight-redux-starter
> npm run test -- --watch


> [email protected] open:src /Users/ryanvice/Documents/Code/pluralsight-redux-starter
> babel-node tools/srcServer.js


> [email protected] lint:watch /Users/ryanvice/Documents/Code/pluralsight-redux-starter
> npm run lint -- --watch


> [email protected] test /Users/ryanvice/Documents/Code/pluralsight-redux-starter
> mocha --reporter progress tools/testSetup.js "src/**/*.test.js" "--watch"


> [email protected] lint /Users/ryanvice/Documents/Code/pluralsight-redux-starter
> esw webpack.config.* src tools "--watch"


events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::3000
    at Object.exports._errnoException (util.js:1007:11)
    at exports._exceptionWithHostPort (util.js:1030:20)
    at Server._listen2 (net.js:1253:14)
    at listen (net.js:1289:10)
    at Server.listen (net.js:1385:5)
    at EventEmitter.listen (/Users/ryanvice/Documents/Code/pluralsight-redux-starter/node_modules/express/lib/application.js:617:24)
    at Object.<anonymous> (srcServer.js:24:5)
    at Module._compile (module.js:541:32)
    at loader (/Users/ryanvice/Documents/Code/pluralsight-redux-starter/node_modules/babel-register/lib/node.js:158:5)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/ryanvice/Documents/Code/pluralsight-redux-starter/node_modules/babel-register/lib/node.js:168:7)

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run-script" "open:src"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] open:src: `babel-node tools/srcServer.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] open:src script 'babel-node tools/srcServer.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 pluralsight-redux-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel-node tools/srcServer.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pluralsight-redux-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls pluralsight-redux-starter
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/ryanvice/Documents/Code/pluralsight-redux-starter/npm-debug.log
ERROR: open:src: None-Zero Exit(1);

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `npm-run-all --parallel test:watch open:src lint:watch`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'npm-run-all --parallel test:watch open:src lint:watch'.
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 pluralsight-redux-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm-run-all --parallel test:watch open:src lint:watch
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pluralsight-redux-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls pluralsight-redux-starter
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/ryanvice/Documents/Code/pluralsight-redux-starter/npm-debug.log

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.