Cli: Netlify Dev --live not working

Created on 20 Feb 2020  ยท  3Comments  ยท  Source: netlify/cli

- Do you want to request a _feature_ or report a _bug_?
Report a Bug

- What is the current behavior?
Requests to the live url result in a blank page due to weird jumbled source-code:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta
      name="description"
      content="Web site created using create-react-app"
    />
    <link rel="apple-touch-icon" href="/logo192.png" />
    <!--
      manifest.json provides metadata used when your web app is installed on a
      user's mobile device or desktop. "vicoolo on as://e oelopers.google.com/pp /funddesnd os/pp 
   -est.json/  use-- <link rel="appleest.jsonf="/logo1est.json prov    <!--
      manifNotr de-co's m of alle-co'tags above.  manifIt will be"applac usele-co-
 e-ttttrrlle--ttt`public` folde "vur-rea-tttbuildnifIt wiOnly f ord on ata--ttt`public` folde "canpplac ferenle-cfrom--tttHTML.
ifIt wiUnlike ico" />
    <me. ""o" />
    <m, ico" />
    <mebe"aifIt wiworkWebrrectly bo
 eo-
 eclis/p- ata-rout-reaand emeon-root publicttrrnifIt wiLearn how toWeb figure emeon-root publicttrr by runn-rea`npm runtbuild`.-- <link rel="title>R     App</title>    /<meta ch<bodyk rel="no
     >You nee-ctoWenabor JavaS     ctoWruntthed st..</no
     > rel="div id="root"></div
      manifNotr Thed HTML f orled a temusetanifIt wilfapp  .gon it directly o'tags browle ,app  be"aps asanpemuty page.
ifIt wiYou canpadds infb ss,used  abov,e. "analy-cosctoWthed f or.ifNotr Thttbuild step be"apuselea-tttbund    
     d ontoWtheh<bodyk abo.
ifIt wiTopplgo'tags opers.gos/p,Wrunt`npm  a
rt`e. "`yarn  a
rt`.ifIt wiTopct-app a etaduc  cotbund  ,of al`npm runtbuild`e. "`yarn build`.-- <link re<
      srct.j a
-co/js/bund     "></
     ><
      srct.j a
-co/js/0.chunk   "></
     ><
      srct.j a
-co/js/main.chunk   "></
     ></bodyk  /< lang

- If the current behavior is a bug, please provide the steps to reproduce.

  • yarn create react-app
  • netlify init
  • netlify dev --live

- What is the expected behavior?
See the same page as running locally (both localhost:3000 and localhost:8888 work) or deployed (http://react-graphql-polls.netlify.com works as well)

- Local Environment Information

โฏ netlify status --verbose
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
 Current Netlify User โ”‚
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Name:   lukas
Email:  [email protected]
Github: lukasluecke
Teams:
  lukas's team: Collaborator
โฏ netlify version
netlify-cli/2.35.0 darwin-x64 node-v12.14.1
area dev dev-live bug

All 3 comments

After I removed all the comments and %PUBLIC_URL% stuff from the index.html (which was the default shipped with create-react-app!) I at least get a valid HTML page:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta
      name="description"
      content="Web site created using create-react-app"
    />
    <title>React App</title>
  </head>
  <body>
    <noscript>You need to enable JavaScript to run this app.</noscript>
    <div id="root"></div>
  <script src="/static/js/bundle.js"></script><script src="/static/js/1.chunk.js"></script><script src="/static/js/main.chunk.js"></script></body>
</html>

But now the JS files can't be loaded.

GET https://react-graphql-polls-a57783.netlify.live/static/js/bundle.js net::ERR_CONTENT_DECODING_FAILED 200

Thanks for opening this issue @lukasluecke. This seems like a bug with the live tunnel. Maybe @Benaiah can shed some light!

Still seeing this issue on Ubuntu 20.04 LTS with Node v12.13.0 and netlify-cli v2.63.2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karl-cardenas-coding picture karl-cardenas-coding  ยท  3Comments

bendg25 picture bendg25  ยท  5Comments

designbuedchen picture designbuedchen  ยท  5Comments

cco3 picture cco3  ยท  4Comments

rabbah picture rabbah  ยท  3Comments