happypoulp / redux-tutorial

Learn how to use redux step by step
3.76k stars 546 forks source link

running sections fails #79

Closed dbhandel closed 8 years ago

dbhandel commented 8 years ago

npm run example 01_simple-action-creator.js runs correctly but all the subsequent sections fail.

npm debug log:

0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'run', 1 verbose cli 'example', 1 verbose cli '05_simple-action-creator.js' ] 2 info using npm@3.3.6 3 info using node@v5.0.0 4 verbose run-script [ 'preexample', 'example', 'postexample' ] 5 info lifecycle redux-tutorial@0.0.1~preexample: redux-tutorial@0.0.1 6 silly lifecycle redux-tutorial@0.0.1~preexample: no script for preexample, continuing 7 info lifecycle redux-tutorial@0.0.1~example: redux-tutorial@0.0.1 8 verbose lifecycle redux-tutorial@0.0.1~example: unsafe-perm in lifecycle true 9 verbose lifecycle redux-tutorial@0.0.1~example: PATH: /usr/local/lib/node_modules/npm/bin/node-gyp-bin:/Users/davidhandel/code/redux-tutorial/node_modules/.bin:/Users/davidhandel/.opam/system/bin:/Users/davidhandel/.rbenv/shims:/Users/davidhandel/.rbenv/shims:/usr/local/heroku/bin:/usr/local/git/bin/git:/usr/local/bin:/Users/davidhandel/.rbenv/shims:/Users/davidhandel/.nave/installed/0.10.22/bin:/Users/davidhandel/.dotfiles/bin:/Users/davidhandel/mongodb-osx-x86_64-2.6.4/bin:/Users/davidhandel:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/deployd/bin:/usr/local/git/bin:/Users/davidhandel/.dotfiles/libs/rbenv/bin:/Users/davidhandel/.dotfiles/libs/ruby-build/bin 10 verbose lifecycle redux-tutorial@0.0.1~example: CWD: /Users/davidhandel/code/redux-tutorial 11 silly lifecycle redux-tutorial@0.0.1~example: Args: [ '-c', 'babel-node --stage=0 "05_simple-action-creator.js"' ] 12 silly lifecycle redux-tutorial@0.0.1~example: Returned: code: 1 signal: null 13 info lifecycle redux-tutorial@0.0.1~example: Failed to exec example script 14 verbose stack Error: redux-tutorial@0.0.1 example: babel-node --stage=0 "05_simple-action-creator.js" 14 verbose stack Exit status 1 14 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/lib/utils/lifecycle.js:233:16) 14 verbose stack at emitTwo (events.js:87:13) 14 verbose stack at EventEmitter.emit (events.js:172:7) 14 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14) 14 verbose stack at emitTwo (events.js:87:13) 14 verbose stack at ChildProcess.emit (events.js:172:7) 14 verbose stack at maybeClose (internal/child_process.js:818:16) 14 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) 15 verbose pkgid redux-tutorial@0.0.1 16 verbose cwd /Users/davidhandel/code/redux-tutorial 17 error Darwin 15.0.0 18 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "example" "05_simple-action-creator.js" 19 error node v5.0.0 20 error npm v3.3.6 21 error code ELIFECYCLE 22 error redux-tutorial@0.0.1 example: babel-node --stage=0 "05_simple-action-creator.js" 22 error Exit status 1 23 error Failed at the redux-tutorial@0.0.1 example script 'babel-node --stage=0 "05_simple-action-creator.js"'. 23 error This is most likely a problem with the redux-tutorial package, 23 error not with npm itself. 23 error Tell the author that this fails on your system: 23 error babel-node --stage=0 "05_simple-action-creator.js" 23 error You can get their info via: 23 error npm owner ls redux-tutorial 23 error There is likely additional logging output above. 24 verbose exit [ 1, true ]

happypoulp commented 8 years ago

Hi,

The log that you pasted shows that you're trying to run:

npm run example 05_simple-action-creator.js

... but there is no such example ;). Examples in this tutorial all have a different name (not the same name with just an increasing number).

The list of examples to run is:

00_introduction.js
01_simple-action-creator.js
02_simple-subscriber.js
03_about-state-and-meet-redux.js
04_simple-reducer.js
05_get-state.js
06_combine-reducers.js
07_dispatch-action.js
08_dispatch-async-action-1.js
09_dispatch-async-action-2.js
10_middleware.js
11_state-subscriber.js
12_Provider-and-connect.js
13_final-words.js

So for example, the fifth example should be executed with: npm run example 05_get-state.js

Hope it helps!

dbhandel commented 8 years ago

Thanks François for setting me straight. :)