Có cái project reactnative dùng expo 3 năm nay không động vào khách muốn nâng cấp. Tự dưng expostart thì gặp lỗi
Invalid regular expression: /(.\__fixtures__\.|node_modules[\]react[\]dist[\].|website\node_modules\.|heapCapture\bundle.js|.\__tests__\.)$/: Unterminated character class
Google thì ra là do các mẹ làm sai regular expression

var sharedBlacklist = [
  /node_modules[/\\]react[/\\]dist[/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];
sửa thành
var sharedBlacklist = [
  /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
  /website\/node_modules\/.*/,
  /heapCapture\/bundle\.js/,
  /.*\/__tests__\/.*/
];Sửa xong là chạy

Article Tags:
 dev · expo · Invalid regular expression · mobile · reactnative · Unterminated character class
 
  
  
 