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

@mdx-js/runtime@next doesn't work in CRA #1663

Closed
yume-chan opened this issue Sep 19, 2021 · 2 comments
Closed

@mdx-js/runtime@next doesn't work in CRA #1663

yume-chan opened this issue Sep 19, 2021 · 2 comments
Labels
🏗 area/tools This affects tooling 👀 no/external This makes more sense somewhere else

Comments

@yume-chan
Copy link

Subject of the issue

@mdx-js/runtime@next doesn't work in CRA

Your environment

  • OS: Windows 10
  • Packages: @mdx-js/runtime@2.0.0-next.9
  • Env: react-scripts@4.0.3

Steps to reproduce

minimal repro

  1. npx create-react-app mdx-runtime-test
  2. cd mdx-runtime-test
  3. yarn add @mdx-js/runtime@next
  4. Add a component using example code in README
  5. yarn start

Expected behaviour

It compiles.

Actual behaviour

> yarn start
yarn run v1.22.10
$ react-scripts start
i 「wds」: Project is running at http://192.168.50.127/
i 「wds」: webpack output is served from
i 「wds」: Content not from webpack is served from D:\dev\mdx-runtime-test\public
i 「wds」: 404s will fallback to /
Starting the development server...

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Failed to compile.

./node_modules/periscopic/dist/periscopic.mjs
Can't import the named export 'walk' from non EcmaScript module (only default export is available)

Maybe related: Rich-Harris/periscopic#10

@ChristianMurphy
Copy link
Member

@yume-chan could you try reducing your example further?
Trying a minimal example: https://codesandbox.io/s/mdx-2-cra-cmy53, it works fine.

@ChristianMurphy ChristianMurphy added 🙉 open/needs-info This needs some more info 🏗 area/tools This affects tooling and removed 🔍 status/open 🐛 type/bug This is a problem labels Sep 21, 2021
@yume-chan
Copy link
Author

Caused by CRA itself (facebook/create-react-app#10356)

@ChristianMurphy ChristianMurphy added 👀 no/external This makes more sense somewhere else and removed 🙉 open/needs-info This needs some more info labels Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏗 area/tools This affects tooling 👀 no/external This makes more sense somewhere else
Development

No branches or pull requests

2 participants