question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Please provide all the information requested. Issues that do not follow this format are likely to stall.

Description

Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest React Native release to make sure your issue has not already been fixed: https://reactnative.dev/docs/upgrading.html

React Native version:

Run react-native info in your terminal and copy the results here.

Steps To Reproduce

Provide a detailed list of steps that reproduce the issue.

Expected Results

Describe what you expected to happen.

Snack, code example, screenshot, or link to a repository:

Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

2reactions
montsea999commented, Aug 24, 2020

HI Safaiyeh! This is Montse from Barcelona. Sorry because is is not a React-native issue. It is a React-360 issue: 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@❤️ 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@❤️ 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 https://github.com/request/request/issues/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 if i can do anything else.

Thank U very much! 😉

0reactions
montsea999commented, Aug 24, 2020

Yes, yes. I ve already done it! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript unterminated character class - regex - Stack Overflow
I get SyntaxError: Invalid regular expression: /(INST1,\[0,/: Unterminated group , i.e. the parenthesis (char 1 in string) doesn't have a ...
Read more >
Expo fails to start the project: error Invalid regular expression ...
js |.\tests\.)$/: Unterminated character class. Run CLI with --verbose flag for more details. Metro Bundler process exited with code 1
Read more >
node_modules\metro-config\src\defaults\blacklist.js - Medium
node_modules\metro-config\src\defaults\blacklist.js. “(React Native) error Invalid regular expression…” is published by Sanidhya Agrawal.
Read more >
Regular expression /[/]/ gives "unterminated character class ...
I noticed this because a regular expression containing [/] appears in http://msdn.microsoft.com/workshop/code/browdata.js, which was mentioned in bug 309695 ...
Read more >
r/reactnative icon - Reddit
FIXING error Invalid regular expression: /(.*\\__fixtures__\\. ... Unterminated character class. Run CLI with --verbose flag for more ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found