facebookarchive/react-360

starting issue

montsea999 opened this issue ยท 4 comments

Description

Is this a Bug or a Feature Request?
For a Bug please explain below what you did, what you expected to happen, and what actually happens.

Expected behavior

start

Actual behavior

isn t start ang give up a bug

Reproduction

This bug appears in the starting of every project on React-360.... I gonna do one example and copy u all the information, and then u can see, ok? ;-)

1- C:\Users\monts\Desktop>npm install -g react-360-cli
C:\Users\monts\AppData\Roaming\npm\react-360 -> C:\Users\monts\AppData\Roaming\npm\node_modules\react-360-cli\index.js

react-360-cli@1.1.0
updated 1 package in 1.893s

2- C:\Users\monts\Desktop>react-360 init prueba1
Creating new React 360 project...
Project directory created at prueba1
Copying assets...
Installing dependencies...
npm WARN deprecated 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.
npm WARN deprecated 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.
npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
npm WARN deprecated request@2.88.2: request has been deprecated, see request/request#3142
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
core-js@2.6.11 postinstall C:\Users\monts\Desktop\prueba1\node_modules\babel-register\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
https://opencollective.com/core-js
https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
core-js@2.6.11 postinstall C:\Users\monts\Desktop\prueba1\node_modules\babel-runtime\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"
core-js@2.6.11 postinstall C:\Users\monts\Desktop\prueba1\node_modules\fbjs-scripts\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"
core-js@2.6.11 postinstall C:\Users\monts\Desktop\prueba1\node_modules\metro\node_modules\core-js
node -e "try{require('./postinstall')}catch(e){}"
electron@1.8.8 postinstall C:\Users\monts\Desktop\prueba1\node_modules\electron
node install.js
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.3 (node_modules\sane\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN react-native@0.55.4 requires a peer of react@16.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN react-360@1.1.0 requires a peer of react@~16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-360@1.1.0 requires a peer of react-native@0.49.5 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-react-native@3.9.0 requires a peer of eslint@^3.17.0 || ^4 || ^5 || ^6 || ^7 but none is installed. You must install peer dependencies yourself.
added 1039 packages from 554 contributors and audited 1040 packages in 38.713s
8 packages are looking for funding
run npm fund for details
found 47 vulnerabilities (43 low, 4 high)
run npm audit fix to fix them, or npm audit for details
Done!
Now enter the new project directory by running cd prueba1
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.

3- C:\Users\monts\Desktop>cd prueba1

4- C:\Users\monts\Desktop\prueba1>npm start

prueba1@0.0.1 start C:\Users\monts\Desktop\prueba1
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! prueba1@0.0.1 start: node node_modules/react-360/scripts/packager.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the prueba1@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\monts\AppData\Roaming\npm-cache_logs\2020-08-24T08_11_26_140Z-debug.log
C:\Users\monts\Desktop\prueba1>cd Desktop

Give me a touch, please, if i can do anything else.

Thank U very much! ;)

Solution

I ve seen it coud be fixed changing regular expression, for this one:
var sharedBlacklist = [
/node_modules[/\]react[/\]dist[/\]./,
/website/node_modules/.
/,
/heapCapture/bundle.js/,
/./tests/./
];

but I couldn t find it, sorry...

Additional Information

  • 'react-360' package version: Version 1.1.0

  • Operating System: Windows10

  • Browser: all

  • VR Device: Out of VR

image
same here

Open the below file in your code editor

node_modules/metro/src/blacklist.js

And replace the code below

var sharedBlacklist = [
/node_modules[/\\]react[/\\]dist[/\\].*/,

/website\/node_modules\/.*/,

/heapCapture\/bundle\.js/,

/.*\/__tests__\/.*/];

With

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

Now It Should work! ๐Ÿ˜‰

Done. It works!
Thank U very much, @PiyushSuthar ! :)

That helped a lot! Thanks!