Setting Up Your React Dev Environment Easily

Iā€™m getting an error when run this command ā€œ./node_modules/.bin/webpackā€ in Node.js Command Prompt.

error : ā€˜.ā€™ is not recognized as an internal or external command operable program or batch file .

OS: Windows 10.

Thanks

Try the following:

node_modules\.bin\webpack

Let me know if that works out for you :slight_smile:

Thanks for the quick reply. I tried that too but didnā€™t work . Then I tried just webpack that works. iā€™m not sure why?

Iā€™m using Visual Studio 2015 and the JSX inteligence are not working ā€¦ any idea ?
Thanks And Much appreciated your help ā€¦

well explained ā€œReactā€ setup tutorial .

That is interesting that webpack works but the longer command doesnā€™t. Iā€™ll have to do some more experimenting to see where things are breaking :stuck_out_tongue:

VS2015 may not support JSX intellisense out of the box.The posted solution here may work: http://stackoverflow.com/questions/34097915/visual-studio-2015-jsx-es2015-syntax-highlighting

:slight_smile:

Thanks for your help

Your React book is the best! Yours is the only one that got me through the entire setup process. I think everything is correct, (and webpack runs fine), but when I open the html page, the page is empty. When I view source on the page it has all the HTML from the example, including the src="output/myCode.js javascript.

Any thoughts? Must be something simple, but Iā€™ve triple checked everything and Iā€™m stuck.

1 Like

Are you using create-react-app? When you do a npm start, does the example work fine in the browser? :slight_smile:

I didnā€™t use create-react-app (but followed the bookā€™s step-by-step process of building it manually, which was quite informative). When I tried npm start in the MyTotallyAwesomeApp directory, I get an error: ā€œmissing script: startā€. I didnā€™t see anything very interesting in the detailed error that was logged (but maybe Iā€™m not seeing something obvious.

Oh gotcha! The instructions in the book are really outdated at this point. The second edition due in about a month will fix that. In the meantime, here is the latest version of that chapter: https://www.kirupa.com/react/setting_up_react_environment.htm

Sorry for the run-around. This is one of those areas that changed significantly since publication last year :slight_smile:

Thanks for the quick response! The new chapter you linked worked great!

1 Like