简体   繁体   中英

React Native 57.1 and Metro Bundler

I am having a hard time finding information about this because basically none of it is searchable by copy and pasting the output I'm getting when bundling the project. But I recently updated to the latest version of React Native, 57.1, after having used a version in the low 40's. Below are my dependencies, followed by the strange output and occasionally errors that my bundler is showing.

      "dependencies": {
"@babel/runtime": "^7.1.2",
"react": "16.5.0",
"react-native": "0.57.1",
"react-navigation": "^2.17.0",
"react-redux": "^5.0.7",
"redux": "^4.0.0"
},
      "devDependencies": {
"babel-jest": "23.6.0",
"jest": "23.6.0",
"metro-react-native-babel-preset": "0.47.0",
"react-test-renderer": "16.5.0"
},

I haven't the slightest in what the below output from metro bundler actually means. I've tried googling different pieces of the response that I've been getting. Prior to updating to 57.1, my bundler output was very clean with simply stating "100% bundle" and "100% DELTA". Is this new "::ffff:127.0.0.1" output normal or is this an issue?

    ::ffff:127.0.0.1 - - [01/Oct/2018:04:05:43 +0000] "GET /launch-js- devtools HTTP/1.1" 200 - "-" "okhttp/3.10.0" 
    DELTA  [android, dev] ../../index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (684/684), done.

    ::1 - - [01/Oct/2018:04:05:45 +0000] "GET /index.delta?platform=android&dev=true&minify=false&deltaBundleId=3f059a53606f9304 HTTP/1.1" 200 - "http://localhost:8081/debugger-ui/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
     MAP  [android, dev] ../../index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (684/684), done.

    ::1 - - [01/Oct/2018:04:05:47 +0000] "GET /index.map?platform=android&dev=true&minify=false&deltaBundleId=3f059a53606f9304 HTTP/1.1" 200 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"

Sometimes it's not an issue, but it's been giving me strange scenarios where I have an error in my code, but it will load 100% anyway, or it will load the Delta twice, one fails and one gets 100%. Below is an example of the Delta failing and succeeding simultaneously:

    ::1 - - [01/Oct/2018:03:28:55 +0000] "GET /index.map?platform=android&dev=true&minify=false&deltaBundleId=368588d58201b180 HTTP/1.1" 200 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36" ::ffff:127.0.0.1 - - [01/Oct/2018:03:30:02 +0000] "GET /launch-js-devtools HTTP/1.1" 200 - "-" "okhttp/3.10.0" 
    DELTA  [android, dev] ../../index.js ░░░░░░░░░░░░░░░░ 0.0% (0/1)::1 
    - - [01/Oct/2018:03:30:03 +0000] "GET /index.delta?platform=android&dev=true&minify=false&deltaBundleId=7af603fc71db260a HTTP/1.1" 200 - "http://localhost:8081/debugger-ui/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36"
    DELTA  [android, dev] ../../index.js ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100.0% (1/1), done.

I am happy to provide more information if needed, but I'm really struggling to find any related questions and threads.

Thank you in advance.

Some time ago I was also having issues with the newest version of react-native, don't remember exactly what, but what solved my problem was using the version 0.55.4.

I'm no expert, but I think you should give it a try. :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM