"No codeFrame could be generated" error on fresh 'npm init gatsby' site

Viewed 1087

I created a fresh gatsby site by using the command npm init gatsby on a M1 Mac. I kept all options to default in the wizard and started by npm run develop. I immediately get this error on every refresh:

enter image description here

Although it's annoying the site is working fine. The error doesn't give much information and I couldn't find anyhting on google. My node version is v17.2.0 and this is the auto generated package.json:

{
  "name": "my-gatsby-site",
  "version": "1.0.0",
  "private": true,
  "description": "My Gatsby Site",
  "keywords": [
    "gatsby"
  ],
  "scripts": {
    "develop": "gatsby develop",
    "start": "gatsby develop",
    "build": "gatsby build",
    "serve": "gatsby serve",
    "clean": "gatsby clean"
  },
  "dependencies": {
    "gatsby": "^4.3.0",
    "react": "^17.0.1",
    "react-dom": "^17.0.1"
  }
}

EDIT:

I'm using Firefox.

2 Answers

There's a lack of details despite being a starter command (browser, browser version, etc). I'd try to follow one of the suggestions of this GitHub thread:

  • If you are registering a service worker, try commenting/removing it

  • If not, play around with the browser cookies (allowing or disallowing):

    enter image description here Allowing the localhost:8000 cookies.

    In the same way, using the opposite cookie approach, you can disable the "Delete cookies and site data when Firefox Developer Edition is closed" option.

Related