How to resolve the error on 'react-native start'

后端 未结 19 2673
说谎
说谎 2020-11-29 15:41
  1. I just installed node.js & cli

    • installed node.js
    • installed react-native-cli

      npm -g react-native-cli
      
19条回答
  •  萌比男神i
    2020-11-29 16:12

    You can go to...

    \node_modules\metro-config\src\defaults\blacklist.js and change...

    var sharedBlacklist = [   /node_modules[/\\]react[/\\]dist[/\\].*/,  
    /website\/node_modules\/.*/,   /heapCapture\/bundle\.js/,  
    /.*\/__tests__\/.*/ ];
    

    for this:

    var sharedBlacklist = [
      /node_modules[\/\\]react[\/\\]dist[\/\\].*/,
      /website\/node_modules\/.*/,
      /heapCapture\/bundle\.js/,
      /.*\/__tests__\/.*/
    ];
    

提交回复
热议问题