ericclemmons / react-resolver

Async rendering & data-fetching for universal React applications.
https://ericclemmons.github.io/react-resolver
Other
1.65k stars 52 forks source link

Stargazers instructions / first install #44

Closed jasonphillips closed 9 years ago

jasonphillips commented 9 years ago

The README file in the Stargazers example project still references the old folder name (examples/contacts) and includes instructions for npm link that were no longer needed since the addition of the pre/postinstall copying.

I also found that an initial npm install in the stargazers directory produces an error, since the preinstall script expects the node_modules and node_modules/react-resolver folders to already exist. That's not a problem for subsequent installs, but requires intervention to work on a freshly cloned repo.

/examples/stargazers$ npm install

> @ preinstall ~/resolver-dev/examples/stargazers
> rm -rf node_modules/react-resolver && cp -R ../../dist node_modules/react-resolver

cp: node_modules/react-resolver: No such file or directory
cp: ../../dist: unable to copy extended attributes to node_modules/react-resolver: No such file or directory
cp: node_modules/react-resolver/Container.js: No such file or directory
cp: node_modules/react-resolver/index.js: No such file or directory
cp: node_modules/react-resolver/Resolver.js: No such file or directory
cp: node_modules/react-resolver/ResolverError.js: No such file or directory

npm ERR! @ preinstall: `rm -rf node_modules/react-resolver && cp -R ../../dist node_modules/react-resolver`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ preinstall script.
npm ERR! This is most likely a problem with the  package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     rm -rf node_modules/react-resolver && cp -R ../../dist node_modules/react-resolver
npm ERR! You can get their info via:
npm ERR!     npm owner ls 
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.4.0
npm ERR! command "~/.nvm/v0.10.38/bin/node" "/Users/jason/.nvm/v0.10.38/bin/npm" "install"
npm ERR! cwd ~/resolver-dev/examples/stargazers
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     ~/resolver-dev/examples/stargazers/npm-debug.log
npm ERR! not ok code 0

So in addition to the README cleanup, the post- and preinstall need a minor adjustment to run without error on first attempt.

ericclemmons commented 9 years ago

Whoops! So this should be postinstall then.

Fixing now...

ericclemmons commented 9 years ago

Fixed via 2d985e46087d092c37ee3976d146d26572b83228 & 4d81384ce2669fcc3e8141b0b217e64a567f7bf5!

Lucky you caught me on my lunch break :D