-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[gatsby-plugin-mdx] cannot find module #21950
Comments
This however works: const gatsbyRemarkPlugins = [
{
resolve: require.resolve('./plugins/gatsby-remark-normalize-url'),
}
] |
Check out how It probably wouldn't be hard to make it to use Gatsby's plugin resolver. |
I assume it is pnpm related which I am also running into. Would be great to have the standard gatsby resolve doing the work. Though I have some slightly different issue.
to every child package to make the mdx rendering work, even though these packages should be taken from the baselib. |
I believe this issue is about resolving plugins that are in the local I think my last comment was a little vague: I'm not sure what the issue you're facing is, @ksjogo. It sounds like you're having more trouble with dependencies as opposed to using the local plugins folder. Can you elaborate a little more? |
Sure.
This works fine for having all plugins etc just in @ksjogo/gatsby.
are not present top-level within |
It sounds like you’re having trouble using I think the issue you’re having is the “phantom dependencies” issue, or you could say you’re trying to use “sibling dependencies.” That’s not supported by any package manager, though npm and yarn can trick you into thinking it’s supported. Try using gatsby-plugin-pnpm in |
Yeah, it is definitely a children dependency thing. |
Thanks for opening up the issue and the investigation! We have an open issue that we're going to track adding the API needed in order to achieve this feature (#21592), so I'm going to close this and we can move any needed conversation over there. |
On deleting node modules folder and package-lock.json and reinstall with cmd "npm install" it worked for me. |
Description
I'm trying to add a custom plugin to
gatsby-plugin-mdx
. I've made sure:/plugins/gatsby-remark-normalize-url
package.json
file andindex.js
gatsby-config.js
Steps to reproduce
My project: https://github.com/muuvmuuv/portfolio (changes not included but can be added)
plugins
(it shouldn't do anything)gatsby develop
Expected result
What should happen?
Actual result
Environment
The text was updated successfully, but these errors were encountered: