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

Cannot find module 'to-style' #1004

Closed
AAverin opened this issue Aug 13, 2019 · 4 comments
Closed

Cannot find module 'to-style' #1004

AAverin opened this issue Aug 13, 2019 · 4 comments

Comments

@AAverin
Copy link

AAverin commented Aug 13, 2019

Bug Report

On version 1.2.0, I get

Error: Cannot find module 'to-style'
  Require stack:
  - .../node_modules/gatsby-mdx/utils/babel-plugin-html-attr-to-jsx-attr.js
  - .../node_modules/gatsby-mdx/utils/gen-mdx.js
  - .../node_modules/gatsby-mdx/gatsby/on-create-node.js
  - .../node_modules/gatsby-mdx/gatsby-node.js
  - .../node_modules/gatsby/dist/bootstrap/resolve-module-exports.js
  - .../node_modules/gatsby/dist/bootstrap/load-plugins/validate.js
  - .../node_modules/gatsby/dist/bootstrap/load-plugins/load.js
  - .../node_modules/gatsby/dist/bootstrap/load-plugins/index.js
  - .../node_modules/gatsby/dist/bootstrap/index.js
  - .../node_modules/gatsby/dist/commands/develop.js
  - /usr/local/lib/node_modules/gatsby-cli/lib/create-cli.js
  - /usr/local/lib/node_modules/gatsby-cli/lib/index.js
@tamagokun
Copy link
Contributor

tamagokun commented Aug 14, 2019

also getting this! using the @next version

@jastuccio
Copy link

If you do not need gatsby @next:

npm install gatsby-plugin-typescript to-style and "gatsby": "2.4.2", in package.json seems to resolve the issue for me.

Found it reading the comment from @StevenLangbroek in issue #999

@rakannimer rakannimer added the v2 label Aug 27, 2019
@rdrey
Copy link

rdrey commented Oct 14, 2019

I solved this by removing gatsby-mdx. Turns out I was only using MDXRenderer from that package and it can now be imported like this:

import { MDXRenderer } from 'gatsby-plugin-mdx'

@stale
Copy link

stale bot commented Dec 13, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 13, 2019
@stale stale bot closed this as completed Dec 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants