【发布时间】:2021-05-01 00:01:47
【问题描述】:
我正在尝试使用命令 react-native init MyProject --version 0.58.6 来初始化一个新的 react native 项目 但每次我这样做时,都会出现如下错误 - 在 80.32 秒内完成。
D:\MyProject\node_modules\metro-config\src\defaults\blacklist.js:34
返回新的正则表达式( ^语法错误:无效的正则表达式: /(.\fixtures\.|node_modules[\]react[\]dist[\].|website\node_modules\.|heapCapture \bundle.js|.\测试\.)$/: 未终止的字符类 在新的正则表达式 () 在黑名单中 (D:\MyProject\node_modules\metro-config\src\defaults\blacklist.js:34:10) 在 getBlacklistRE (D:\MyProject\node_modules\react-native\local-cli\util\Config.js:56:10) 在对象。 (D:\MyProject\node_modules\react-native\local-cli\util\Config.js:71:20) 在 Module._compile (internal/modules/cjs/loader.js:959:30) 在 Module._compile (D:\MyProject\node_modules\pirates\lib\index.js:99:24) 在 Module._extensions..js (internal/modules/cjs/loader.js:995:10) 在 Object.newLoader [as .js] (D:\MyProject\node_modules\pirates\lib\index.js:104:7) 在 Module.load (internal/modules/cjs/loader.js:815:32) 在 Function.Module._load (internal/modules/cjs/loader.js:727:14)
构建依赖关系完成后
【问题讨论】:
标签: react-native npm