小编Son*_*vin的帖子

如何解决“反应本机启动”上的错误

  1. 我刚刚安装了node.js和cli

  2. 并创建了一个“新项目”。

    react-native init new_project
    
    Run Code Online (Sandbox Code Playgroud)
  3. 在“ new_project”目录中,我很疲倦地查看Metro bundler是否运行良好。

    react-native start
    
    Run Code Online (Sandbox Code Playgroud)
  4. 但是该命令给了我以下错误,并且Metro无法启动。有任何解决此错误的线索吗?(我正在使用Windows 10 OS。)

    • 命令: C:\projects\new_proj>react-native start

      错误无效的正则表达式:/(.\fixtures.|node_modules[]react[]dist[].|website\node_modules.|heapCapture\bundle.js|.\tests。)$/:未终止的字符类。使用--verbose标志运行CLI以获取更多详细信息。SyntaxError:无效的正则表达式:/(..fixtures.|node_modules[]react[]dist[].|website\node_modules.|heapCapture\bundle.js|.\tests.)$/:新RegExp( )在getBlacklistRE(D:\ projects \ new_proj \ node_modules \ react-native \ node_modules @ react-native)的黑名单(D:\ projects \ new_proj \ node_modules \ metro-config \ src \ defaults \ blacklist.js:34:10) getDefaultConfig上的-community \ cli \ build \ tools \ loadMetroConfig.js:69:59)(D:\ projects \ new_proj \ node_modules \ react-native \ node_modules @ react-native-community \ cli \ build \ tools \ loadMetroConfig.js :85:20)在负载(D:

reactjs react-native react-native-android react-native-cli metro-bundler

48
推荐指数
11
解决办法
3万
查看次数