pl12133 / react-solitaire

A game of Solitaire in React
http://pl12133.github.io/react-solitaire/
168 stars 51 forks source link

Couldn't get it to run #2

Closed hasen6 closed 8 years ago

hasen6 commented 8 years ago

I've followed the installation instructions to have this running on my computer. Post and host are set to localhost and 8080 in the server.js file. Chrome error shows it can't find the file react-solitaire/dist/bundle.js which seems to make sense since its not there. Not sure what that file is. I have NPM started in the correct directory too. I'm more familiar with React Native so not sure how to run this but am interested in the project.

pl12133 commented 8 years ago

Hey @hasen6, the dist/bundle.js should be created by Webpack Dev Server when you run the command npm start. If you are running that command from the react-solitaire folder, your index.html file should be able to find the bundle in dist/bundle.js. If the error cannot find react-solitaire/dist/bundle.js, check the path in index.html file or make sure you are running the npm start command inside the react-solitaire folder. Try going to localhost:8080/dist/bundle.js in your browser and seeing if the bundle is there.

If you are familiar with webpack you can change the output path of the bundle in webpack/webpack.config.dev.js. Otherwise you can compile the bundle with npm run build, then change the path inside of index.html to point at the bundle built in the lib/ folder. I hope you're able to get it working!

hasen6 commented 8 years ago

Ok I haven't installed webpack dev server, I just installed NPM. Not familiar with webpack dev server really. I am running NPM Start within the react-solitaire folder. Sorry for the noob questions.

hasen6 commented 8 years ago

Ok installing webpack dev server didn't seem to change anything. The NPM start seems a bit weird, it just outputs all this:

[797] ./~/redux-devtools/lib/react/themes/railscasts.js 511 bytes {0} [built] [798] ./~/redux-devtools/lib/react/themes/shapeshifter.js 513 bytes {0} [built] [799] ./~/redux-devtools/lib/react/themes/solarized.js 531 bytes {0} [built] [800] ./~/redux-devtools/lib/react/themes/summerfruit.js 525 bytes {0} [built] [801] ./~/redux-devtools/lib/react/themes/tomorrow.js 514 bytes {0} [built] [802] ./~/redux-devtools/lib/react/themes/tube.js 489 bytes {0} [built] [803] ./~/redux-devtools/lib/react/themes/twilight.js 507 bytes {0} [built] [804] ./~/redux-devtools/lib/react/themes/nicinabox.js 613 bytes {0} [built] [805] ./~/redux-devtools/lib/react/DebugPanel.js 3.44 kB {0} [built] webpack: bundle is now VALID.

Is that how its supposed to finish?

hasen6 commented 8 years ago

Got it working now. Thanks for your help.

pl12133 commented 8 years ago

Yup, as long as it says [built] webpack: bundle is now VALID. then you should be all good. Asking any question is fine with me so don't worry about it! Webpack and all the tools on NPM can be a lot to learn, but it can be fun to figure it all out.

I'm glad it works! I hope you enjoy it. I'm going to close the issue but if there are more questions you can ask them here.