Search code examples
htmlreactjstypescriptwebmanifest

The attempt to bind "/%PUBLIC_URL%/manifest.json" in the workspace failed as this URI is malformed when running on Netlify


Having this error on my website when it goes live but the error is not shown in local:host just for the live build. I cannot seem to find a solution. Help would be great! [the error that is shown when inspecting the website][1] [1]: https://i.sstatic.net/Jap8g.png

  "short_name": "TestWeb",
  "name": "TestWeb",
  "description": "Best Place On Earth",
  "icons": [
    {
      "src": "favicon.ico",
      "type": "image/x-icon",
      "sizes": "256x256"
    }
  ],
  "start_url": ".",
  "display": "standalone",
  "theme_color": "#000000",
  "background_color": "#ffffff"
}

Solution

  • I'm not sure what type of app that you're building, but for the sake of assumption, let's say you're using a "create-react-app" app or something else cli-generated.

    This seems to happen when you try running "netlify deploy" before anything else. What you can do is create a netlify.toml file (read more here: link) and provide the basic criteria, assuming you've got a create-react-app app:

    [build]
      publish = "build/"
    
    
      command = "npm run build"
    
    

    Once you've done that, try running netlify build. Try now running the bundled app locally using serve, or something similar. If that works, then run netlify deploy and see whether it worked live.

    I ran into this problem just now, and this is how I solved it.