美文网首页
React Native 报错 提示node 版本过高

React Native 报错 提示node 版本过高

作者: 悟空_大师兄_ | 来源:发表于2020-04-01 14:02 被阅读0次

    node node_modules/react-native/local-cli/cli.js start

    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.

    npm ERR! code ELIFECYCLE

    npm ERR! errno 1

    npm ERR! demo@0.0.1 start: `node node_modules/react-native/local-cli/cli.js start`

    npm ERR! Exit status 1

    npm ERR!

    npm ERR! Failed at the demo@0.0.1 start script.

    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

    npm ERR! A complete log of this run can be found in:

    npm ERR!    C:\Users\pc\AppData\Roaming\npm-cache\_logs\2020-04-01T05_58_36_248Z-debug.log

    解决办法:

    修改node_modules\metro-config\src\defaults\blacklist.js文件

    var sharedBlacklist = [

      /node_modules[\/\\]react[\/\\]dist[\/\\].*/,

      /website\/node_modules\/.*/,

      /heapCapture\/bundle\.js/,

      /.*\/__tests__\/.*/

    ];

    相关文章

      网友评论

          本文标题:React Native 报错 提示node 版本过高

          本文链接:https://www.haomeiwen.com/subject/obfyyhtx.html