facebookarchive / react-360

Create amazing 360 and VR content using React
https://facebook.github.io/react-360
Other
8.73k stars 1.23k forks source link

`npm starts` after opening url http://localhost:8081/vr/index.html give 403 Forbidden #425

Closed vikram-rajput closed 6 years ago

vikram-rajput commented 6 years ago

Description

i have tried to run example react-vr app i have followed all the steps in getting started guide

getting started

npm install -g react-vr-cli react-vr init WelcomeToVR cd WelcomeToVR npm start

Open your browser to http://localhost:8081/vr/index.html.

but it gives me 403 Forbidden

in terminal it shows

`$ npm start

vrApp@0.0.1 start D:\hgs-project\JAN2018\reactVR\vrApp node -e "console.log('open browser at http://localhost:8081/vr/\n\n');" && nod e node_modules/react-native/local-cli/cli.js start

open browser at http://localhost:8081/vr/

┌────────────────────────────────────────────────────────────────────────────┐ │ Running packager on port 8081. │ │ │ │ Keep this packager running while developing on any JS projects. Feel │ │ free to close this tab and run your own packager instance if you │ │ prefer. │ │ │ │ https://github.com/facebook/react-native │ │ │ └────────────────────────────────────────────────────────────────────────────┘ Looking for JS files in D:\hgs-project\JAN2018\reactVR\vrApp

React packager ready.

Loading dependency graph, done. `

mikearmstrong001 commented 6 years ago

I've been unable to repro your problem, my test machine was on a mac.

Can you provide more details, version of npm, yarn, dev machine, etc as without this information we will be guessing.

vikram-rajput commented 6 years ago

Hi Mike,

Thanks for reply. i am trying to run react-vr app on 64 bit Windows 8.1 machine. node version : 8.9.4 npm : 5.6.0 yarn : v0.27.5 version

react-vr

browser-react

vikram-rajput commented 6 years ago

Hi Mike,

I found problem, the port number 8081 is being used by mcAfee Antivirus. i have made changes in node node_modules/react-native/local-cli/server/server.js default port no to 8087

now its working.

Thanks

NhanBlack commented 6 years ago

good resolve

vikram-rajput commented 6 years ago

another solution i found: insted of npm start we can run command

npm start --port 8087

(in this case no need to change any module files.)