-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
"Unexpected Token" error with mdx-deck v4 and code-surfer #83
Comments
Same problem here. |
Hey, I haven't tested code surfer with mdx-deck v4 yet. I'll give it a try this week. |
@rmarku are you also using |
Same problem here. Using:
|
After some testing i'm pretty sure this is a problem with mdx-deck and webpack - I'm getting errors whenever I import anything on my I'll try to debug over on the mdx-repo with you :) |
It is definitely with
module.exports = {
pathPrefix: "/",
plugins: [
{
resolve: "gatsby-theme-mdx-deck",
- }
+ },
+ {
+ resolve: "gatsby-plugin-compile-es6-packages",
+ options: {
+ modules: ["@mdx-deck/gatsby-plugin"]
+ }
}
]
}; I know this could only ever be a "temporary" solution and is just fighting symptoms instead of solving the root cause (little bit like taking pain-killers when wearing too small shoes). Edit: Does not solve the issue entirely. I need to check again. |
@mister-what hmm. you're definitely on the right track. my silly fix on the other issue was to basically do the same thing, transpile it works with code-surfer 3, but not with 4. i'll try to keep investigating to see how to get the gatsby-theme and v4 to work well together. |
To ask a likely-naive question, is this issue blocking updating the mdx-deck dependency to allow for version 4.1.1 generally? I just added code-surfer to an existing mdx-deck presentation (using |
Actually, code imports don't seem to work for me either. Using |
Can't seem to get mdx-deck v4.1.1 to work with code-surfer file import either |
I spent some hours today to get some combination of dependencies working, so that I can use code-surfer and gatsby and use an pathPrefix to host my presentations on a subpath on some website. I needed to use some older versions, as this is totally fine for me I now am happy with my setup. If anyone is interested: // package.json "devDependencies": {
"@babel/core": "^7.0.0",
"@types/react": "^16.9.11",
"@types/react-dom": "^16.9.4",
"gatsby": "^2.13.24",
"gatsby-source-filesystem": "^2.1.48",
"gatsby-theme-mdx-deck": "^3.0.0",
"gatsby-plugin-compile-es6-packages": "2.1.1",
"mdx-deck": "^3.0.10",
"typescript": "^3.7.2",
"code-surfer": "3.1.1",
"react-icons": "4.4.0",
"prismjs": "1.28.0"
},
"dependencies": {
"react": "^16.12.0",
"react-dom": "^16.12.0"
} // gatsby.config.js module.exports = {
pathPrefix: '/decks',
plugins: [
{
resolve: 'gatsby-theme-mdx-deck',
options: {
cli: true,
contentPath: 'decks',
},
},
{
resolve: 'gatsby-plugin-compile-es6-packages',
options: {
modules: ['@mdx-deck/themes'],
},
},
],
}; |
👋 Hey there!
I just threw together a sample project with mdx-deck@v4/gatsby and code-surfer@v3. When I attempted to run
gatsby develop
I got this errorIt seems to be related to code-surfer, though the error being printed is pointing to mdx-deck, so I figured I'd open an issue here and on mdx-deck's repo.
Below is a sample project that should be able to recreate the error.
Sample Project: https://github.com/mhartington/mdx-deck-v4-issue
The text was updated successfully, but these errors were encountered: