pugnascotia / spring-react-boilerplate

An example of an isomorphic application using Java + Spring with React, React Router and Redux
MIT License
155 stars 51 forks source link

Unable to reach site at localhost:9090 #4

Closed CyberJimbo closed 8 years ago

CyberJimbo commented 8 years ago

Hi Rory, Thanks for you informative blogs in this series. When I run 'npm run watch' and then start the server, I am unable to reach the site at localhost:9090, I am able to reach it at localhost:8080. Should I be able to reach the site at 9090 like in your first blog post? The error message I receive is:

Error: [HPM] Invalid context. Expecting something like: "/api" or ["/api", "/ajax"] at Object.matchContext as match at shouldProxy (/Users/james/server/spring-react-boilerplate/node_modules/http-proxy-middleware/lib/index.js:70:31) at middleware (/Users/james/server/spring-react-boilerplate/node_modules/http-proxy-middleware/lib/index.js:38:13) at Layer.handle as handle_request at trim_prefix (/Users/james/server/spring-react-boilerplate/node_modules/express/lib/router/index.js:312:13) at /Users/james/server/spring-react-boilerplate/node_modules/express/lib/router/index.js:280:7 at Function.process_params (/Users/james/server/spring-react-boilerplate/node_modules/express/lib/router/index.js:330:12) at next (/Users/james/server/spring-react-boilerplate/node_modules/express/lib/router/index.js:271:10) at /Users/james/server/spring-react-boilerplate/node_modules/webpack-dev-server/lib/Server.js:183:7 at Layer.handle as handle_request

Please forgive my ignorance here - I am a backend java/groovy/Spring developer but alas I do not have much front-end experience and am just starting to play around with React.

Thanks again.

pugnascotia commented 8 years ago

You should definitely be able to reach localhost:9090. I don't recall ever seeing the same error as you - can you run the following commands and copy the output here?

Thanks.

CyberJimbo commented 8 years ago

the node version is: 6.2.1

the npm version is: 3.9.3

npm_ls.txt

Thanks.

pugnascotia commented 8 years ago

I haven't forgotten about this, I just haven't had a chance to look at it!

CyberJimbo commented 8 years ago

Please, take all the time you need, im not in a hurry and im very appreciative that you put up those great blogs and src repos in the first place!

pugnascotia commented 8 years ago

I've just stumbled into this exact problem on another project and I've pushed a fix (it was remarkably small). Please let me know if it works, or re-open the issue otherwise.

CyberJimbo commented 8 years ago

Yes sir :) it works, thanks!