Andrew
Andrew

Reputation: 3989

Chrome extension using React.js causes "Manifest file is missing or unreadable" error

I'm encountering the Manifest file is missing or unreadable error when trying to load my unpacked Chrome extension. I'm building the extension as a react app, so the file structure looks like this:

enter image description here

I understand that the manifest.json needs to be in the root folder, not in public the way react usually lays it out. When I move it to the root however, it breaks the connection to app.js and my popup only loads index.html with none of the javascript connected.

This is how my manifest is laid out:

{
  "manifest_version": 2,

  "name": "My Extension",
  "description": "This extension is a starting point to create a real Chrome extension",
  "version": "0.0.1",

  "browser_action": {
    "default_popup": "index.html",
    "default_title": "Open the popup"
  },
  "icons": {
    "16": "/public/images/get_started16.png",
    "48": "/public/images/get_started48.png",
    "128": "/public/images/get_started128.png"
  },
  "permissions": [
  ]
}

Upvotes: 1

Views: 1582

Answers (1)

hellomello
hellomello

Reputation: 8587

Not sure if you've figured this one out already since its been awhile since someone answered, but once you are done, do npm run build. This should create your "build" which will have your manifest file, after that, load unpackaged "build" folder.

Hope this helps.

Upvotes: 1

Related Questions