galio-org / galio-starter-kit

Galio's starter kit is an app you can use to see what you can create with our library
https://galio.io
MIT License
181 stars 70 forks source link

Not start app #16

Open tibadeux opened 4 years ago

tibadeux commented 4 years ago

PS > npm start

@galio-org/galio@1.1.0 start x:\yy\zzz expo start

Starting project at x:\yy\zzz Expo DevTools is running at http://localhost:19002 Opening DevTools in the browser... (press shift-d to disable) error Invalid regular expression: /(.\fixtures\.|node_modules[\]react[\]dist[\].|website\node_modules\.|heapCapture\bundle.js|.\tests\.)$/: Unterminated character class.

Metro Bundler process exited with code 1 Set EXPO_DEBUG=true in your env to view the stack trace. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! @galio-org/galio@1.1.0 start: expo start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @galio-org/galio@1.1.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

palingheorghe commented 4 years ago

Hi @tibadeux !

I was looking into this issue but this has nothing to do with Galio. This is most probably caused by your version of node. As far as I see here they fixed it a month ago so by updating package.json you could also repair it.

Thanks!

randrade86 commented 4 years ago

Hi @palingheorghe

Thanks for your answer. I know that this error is not related with Galio framework itself but the starter kit won't even start with an up-to-date Node since it depends on broken packages.

Could you please advise what dependency we need to edit in the package.json in order to use the newer (and fixed) metro-config? Looks like the problem is related with Expo SDK 35.

Thanks in advance.

palingheorghe commented 4 years ago

Hi @randrade86 ! The problem is related to the node version. I wrote something wrong there because you can't fix the problem by updating package.json. You need to update your packages (node, metro, expo-cli). You should be able to fix it buy updating node or downgrading it to <12.9.1. You could also try updating the app to SDK 36 and use it with the latest nodeJS version.

Thanks!

randrade86 commented 4 years ago

@palingheorghe , thanks for your reply. I tried to update to SDK 36.0.0 / 36.0.0.1 but then I received many other errors. Guess we will have to edit the blacklist.js file that is broken since downgrading Node is not an option.

Thanks.

EDIT: Here is the link for fixing it manually: https://stackoverflow.com/a/58122821/4937064

Open node_modules/metro-config/src/defaults/blacklist.js and change:

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

to:

var sharedBlacklist = [
  /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];
palingheorghe commented 4 years ago

Nice! I'm glad you've solved it @randrade86 ! That's just a local fix though so basically if people are forking your app and they're hitting npm install they'll still use the normal blacklist.js file. I'll update galio's app as soon as I clear my schedule.

Thanks!