Please provide the following:
SDK Version: 41.0.0
Platforms(Android/iOS/web/all): Android/IOS
Hi!
I have just updated my project with expo upgrade and following the different steps.
On the launch of my app I have this error :
Cannot find module 'metro-config/src/defaults/blacklist'
My project is a monorepo and I use expo-yarn-workspace too
There is my metro.config.js :
const { createMetroConfiguration } = require('expo-yarn-workspaces');
module.exports = createMetroConfiguration(__dirname);
And diff version in my package.json :
"@expo/metro-config": "^0.1.76",
"expo-yarn-workspaces": "^1.5.1",
"react-native": "0.64.2",
If you have any idea to resolve that?
Ok I found the solution …
I fixed it by find where 'metro-config/src/defaults/blacklist'
is call and replace it
by 'metro-config/src/defaults/exclusionList'
because it’s been renamed.
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
'use strict';
var path = require('path');
var list = [/\/__tests__\/.*/];
function escapeRegExp(pattern) {
if (Object.prototype.toString.call(pattern) === '[object RegExp]') {
// the forward slash may or may not be escaped in regular expression depends
// on if it's in brackets. See this post for details
// https://github.com/nodejs/help/issues/3039. The or condition in string
This file has been truncated. show original
opened 08:00PM - 27 Sep 19 UTC
closed 06:59PM - 29 Oct 19 UTC
**Do 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
system
closed
July 15, 2021, 12:55pm
#3
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.