React-360: React 360 fails to start on Windows Machine

Created on 17 Jan 2020  路  7Comments  路  Source: facebookarchive/react-360

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 > [email protected]: 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 > [email protected]: 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 > [email protected]: 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 > [email protected]: 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 > [email protected]: 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 > [email protected]: use String.prototype.padStart()
warning react-devtools > electron > electron-download > nugget > progress-stream > through2 > xtend > [email protected]:
[2/4] Fetching packages...
info [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > [email protected]" has incorrect peer dependency "[email protected]".
warning "react-native > [email protected]" has unmet peer dependency "eslint@^3.17.0 || ^4 || ^5 || ^6".
warning " > [email protected]" has incorrect peer dependency "react@~16.0.0".
warning " > [email protected]" has incorrect peer dependency "[email protected]".
[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.

[email protected] 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! [email protected] start: `node node_modules/react-360/scripts/packager.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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

Most helpful comment

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

All 7 comments

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

Thank you, I appreciate your help!

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

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

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

Maybe we should make a pull request with this fix?

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tlakomy picture tlakomy  路  3Comments

danbugs picture danbugs  路  3Comments

nafiou picture nafiou  路  3Comments

lazerwalker picture lazerwalker  路  3Comments

meta-meta picture meta-meta  路  3Comments