metro-config sharedBlacklist regexp without scape "\"
See original GitHub issueDo you want to request a feature or report a bug? bug
What is the current behavior? When i try to run react-native start an error is outputed
error Invalid regular expression: /(.*\\__fixtures__\\.*|node_modules[\\\]react[\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__tests__\\.*)$/: Unterminated character class. Run CLI with --verbose flag for more details.
SyntaxError: Invalid regular expression: /(.*\\__fixtures__\\.*|node_modules[\\\]react[\\\]dist[\\\].*|website\\node_modules\\.*|heapCapture\\bundle\.js|.*\\__tests__\\.*)$/: Unterminated character class
at new RegExp (<anonymous>)
at blacklist (C:\Users\***\react\myApp\node_modules\metro-config\src\defaults\blacklist.js:34:10)
at getBlacklistRE (C:\Users\***\react\myApp\node_modules\@react-native-community\cli\build\tools\loadMetroConfig.js:69:59)
at getDefaultConfig (C:\Users\***\react\myApp\node_modules\@react-native-community\cli\build\tools\loadMetroConfig.js:85:20)
at load (C:\Users\***\react\myApp\node_modules\@react-native-community\cli\build\tools\loadMetroConfig.js:121:25)
at Object.runServer [as func] (C:\Users\***\react\myApp\node_modules\@react-native-community\cli\build\commands\server\runServer.js:82:58)
at Command.handleAction (C:\Users\***\react\myApp\node_modules\@react-native-community\cli\build\cliEntry.js:160:21)
at Command.listener (C:\Users\***\react\myApp\node_modules\commander\index.js:315:8)
at Command.emit (events.js:210:5)
at Command.parseArgs (C:\Users\***\react\myApp\node_modules\commander\index.js:651:12)
Please provide your exact Metro configuration and mention your Metro, node, yarn/npm - =-- - version and operating system.
- See above for metro config.
- Windows 10 x64
- node v12.11.0
- npm@6.11.3
- metro@0.56.0
- metro-config@0.56.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:23
- Comments:39
Top Results From Across the Web
How to resolve the error on 'react-native start' - Stack Overflow
Open \node_modules\metro-config\src\defaults\blacklist.js. Replace the following. From var sharedBlacklist = [ /node_modules[/\\]react ...
Read more >Metro-symlinked-deps - npm.io
The general process for developing on a dependency that is sharing components with the main app would be to use yarn link /...
Read more >Examples of regular expressions - Google Workspace Admin ...
The following examples illustrate the use and construction of simple regular expressions. Each example includes the type of text to match, one or...
Read more >Solved: Invalid Regex Error React Native | by Shreyas Nisal
Go into your node_modules directory, and look for metro-config. Next, go into src/defaults, and open the blacklist. js file.
Read more >Blacklists — designate 2.1.0 documentation
If it matches the regex pattern, then a 400 is returned with the message “Blacklisted domain name”. If there is no match, then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Replace existing shareBlacklist with this:
https://github.com/facebook/metro/issues/453
for who still get this error without official patch in react-native , expo use yarn and add this setting into package.json