Setting Up Your React Dev Environment Easily


#1

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


#2

Try the following:

node_modules\.bin\webpack

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


#3

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 .


#4

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:


#5

Thanks for your help


#6

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.


#7

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


#8

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.


#9

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:


#10

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