Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: pragma and pragmaFrag cannot be set when runtime is automatic #1579

Open
saintasia opened this issue Oct 15, 2020 · 8 comments
Open

Comments

@saintasia
Copy link

Bug Report

Describe the bug

After creating a new project with yarn create docz-app my-docz-app --example typescript and then running yarn dev, the process crushes after run page queries with the following errors:

ERROR #98123  WEBPACK

Generating development JavaScript bundle failed
/typescript/README.md: pragma and pragmaFrag cannot be set when runtime is automatic.

To Reproduce

  1. yarn create docz-app my-docz-app --example typescript
  2. cd my-docz-app
  3. yarn dev

Expected behavior

Expect gatsby dev process to finish without errors

Environment

  • docz version: "latest",
  • OS: MacOS Catalina 10.15.7
  • Node v12.19.0/yarn 1.22.10
@joeldbirch
Copy link

joeldbirch commented Oct 15, 2020

I found this Gatsby issue that mentioned (as a workaround for a different but similar error) locking Gatsby to v2.24.51 and that avoided this issue for me. Maybe the real fix is in that thread somewhere?
gatsbyjs/gatsby#26736 (comment)

@ltsfran
Copy link

ltsfran commented Oct 15, 2020

It's the same for me.

1 similar comment
@nanxiaobei
Copy link

It's the same for me.

@jayknyn
Copy link

jayknyn commented Oct 16, 2020

There's a thread over at system-ui with the same issue and setting react and react-dom to v16.13.1 solved this issue for me.

@ltsfran
Copy link

ltsfran commented Oct 16, 2020

In my case, I'm trying to raise the project from scratch and I'm not adding any configuration file like .babelrc

@mpeyper
Copy link

mpeyper commented Oct 21, 2020

Same issue for me when upgrading react from 16.13.1 to 16.14.0 or 17.0.0.

@e1en0r
Copy link

e1en0r commented Oct 30, 2020

While we're waiting for a fix, I was able to get my project building again after upgrading to React 17.0.0 by adding this to my gatsby-node.js file.

exports.onCreateBabelConfig = ({ actions }) => {
  actions.setBabelPreset({
    name: `babel-preset-gatsby`,
    options: {
      reactRuntime: 'classic'
    }
  })
};

diondiondion added a commit to 5app/base5-ui that referenced this issue Nov 4, 2020
This should hopefully fix the failing deployment
of the documentation site
doczjs/docz#1579
@mpeyper
Copy link

mpeyper commented Nov 11, 2020

I just reran my netlify deploy with a cleared cache today (without any changes being made) and it's passing now. Not sure if anything downstream has changed or if anyone else has seen success?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants