Skip to content
This repository has been archived by the owner on Dec 15, 2020. It is now read-only.

React 360 fails to start on Windows Machine #778

Open
drubio1989 opened this issue Jan 16, 2020 · 7 comments
Open

React 360 fails to start on Windows Machine #778

drubio1989 opened this issue Jan 16, 2020 · 7 comments

Comments

@drubio1989
Copy link

Description

Is this a Bug or a Feature Request?

React 360 is failing to start when installing a new package on Windows.

Expected behavior

react-360 init and npm start should succeed in starting localhost:8081 to view project

Actual behavior

When I execute react-360 init Demoapp, I get the following notice:

Copying assets...

Installing dependencies...
yarn install v1.21.1
info No lockfile found.
[1/4] Resolving packages...
warning react > fbjs > core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > babel-runtime > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > fbjs-scripts > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > metro > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > babel-register > core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
warning react-native > metro > left-pad@1.3.0: use String.prototype.padStart()
warning react-devtools > electron > electron-download > nugget > progress-stream > through2 > xtend > object-keys@0.4.0:
[2/4] Fetching packages...
info fsevents@1.2.11: The platform "win32" is incompatible with this module.
info "fsevents@1.2.11" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > react-native@0.55.4" has incorrect peer dependency "react@16.3.1".
warning "react-native > eslint-plugin-react-native@3.8.1" has unmet peer dependency "eslint@^3.17.0 || ^4 || ^5 || ^6".
warning " > react-360@1.1.0" has incorrect peer dependency "react@~16.0.0".
warning " > react-360@1.1.0" has incorrect peer dependency "react-native@0.49.5".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 20.57s.
Done!
  Now enter the new project directory by running `cd DemoVR`
  Run `npm start` to initialize the development server
  From there, browse to http://localhost:8081/index.html
  Open `index.js` to begin editing your app.

HelloWorldVR@0.0.1 start C:\Users\danie\Desktop\HelloWorldVR
node node_modules/react-360/scripts/packager.js

open browser at http://localhost:8081/index.html

Starting React Native Packager...

Invalid regular expression: /(node_modules[\\\]react[\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__tests__\\.*)$/: Unterminated character class

An error occurred during the packager process. Exited with code 1.
Look at the packager output above to see what went wrong.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! HelloWorldVR@0.0.1 start: `node node_modules/react-360/scripts/packager.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the HelloWorldVR@0.0.1 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\danie\AppData\Roaming\npm-cache\_logs\2020-01-16T23_41_15_666Z-debug.log

Reproduction

List all the steps required to encounter the issue you're reporting. These steps should be clear and concise.

install node v12.14 on Windows 10. Next following the instructions to create a HelloWorld application. On react 360 init you receive the error for corejs and on npm start, the application does not start.

Additional Information

  • 'react-360' package version: react-360@1.1.0
  • 'react-360-web' package version: react-360-web@1.1.0
  • Operating System: Windows
  • Browser: all
  • VR Device: n/a
@FrankieLaw
Copy link

After a long exhausted search. I discovered that the regular expression came from the metro package. You can find this inside your project node_modules/metro/src/blacklist.js

Find the part where it says..
var sharedBlacklist = [ ... ];

and replace that regular expression:

var sharedBlacklist = [
  /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];

run npm start
goto localhost:8081/index.html

The solution link is here.
https://forums.expo.io/t/error-invalid-regular-expression/29823/6

@drubio1989
Copy link
Author

Thank you, I appreciate your help!

@sprucetonye
Copy link

Hi guys, please this a pressing issue. Am still lost, can't find a way around. Thanks

@sprucetonye
Copy link

Heyyyyy Guys thank a lot, its now working really do appreciate @drubio1989 @Cowwy @facebook @React360

@elmehdiyessad
Copy link

for persons whose not find the blacklist.js file in this path node_modules / metro / src / blacklist.js
try to search here in your project : node_modules / metro-config / src / blacklist.js

@Hyllesen
Copy link

Maybe we should make a pull request with this fix?

@jrjones
Copy link

jrjones commented Aug 17, 2020

A pull request implies there is still someone managing this project so they could merge it. 😭

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants