Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Code block actually tries to run code #16

Closed
jordyvandomselaar opened this issue Jun 22, 2019 · 2 comments
Closed

Code block actually tries to run code #16

jordyvandomselaar opened this issue Jun 22, 2019 · 2 comments

Comments

@jordyvandomselaar
Copy link

jordyvandomselaar commented Jun 22, 2019

I have the following piece of markdown:

image

It's a screenshot because github tries to render it as a code block…


I get the following error in my slides:

ERROR in ./presentation/reducers.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: ENOENT: no such file or directory, open '/Users/jordyvandomselaar/workspace/redux-meetup/presentation/reducers.js'

It actually tries to import the file? I just want it to display the code.

@jordyvandomselaar
Copy link
Author

It suddenly started working. No idea what happened, just a heads up.

@TrevorBurnham
Copy link

I'm seeing this same bug. It's really weird:

import foo from 'foo';

works as expected, but

import foo from 'foo';
import bar from 'bar';

errors with

ERROR in ./presentation/index.mdx
Module not found: Error: Can't resolve 'bar'

If I flip the lines around, it's foo that can't be resolved. So it seems like the first import in a code block is (correctly) ignored as presentation content, but any subsequent imports are executed.

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

No branches or pull requests

2 participants