andrewbranch / gatsby-remark-vscode

Gatsby plugin to provide VS Code’s syntax highlighting to Markdown code fences
MIT License
294 stars 27 forks source link

vscode extensions not working #101

Closed mustran closed 4 years ago

mustran commented 4 years ago

I am trying to use the Andromeda theme, but I'm getting the following error:

Screenshot from 2020-06-05 18-24-30

My gatsby-config.js looks like this:

module.exports = {
  siteMetadata: {
    // edit below
    title: `Gatsby Starter Personal Blog`,
    author: `Kyle Matthews`,
    description: `A starter personal blog with styled components, dark mode, and Netlify CMS.`,
    siteUrl: `https://gatsby-starter-blog-demo.netlify.com/`,
    social: {
      twitter: `kylemathews`,
    },
  },
  plugins: [
    `gatsby-plugin-netlify-cms`,
    `gatsby-plugin-styled-components`,
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    `gatsby-plugin-offline`,
    `gatsby-plugin-react-helmet`,
    `gatsby-plugin-feed-mdx`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        path: `${__dirname}/content/blog`,
        name: `blog`,
      },
    },
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        path: `${__dirname}/content/assets`,
        name: `assets`,
      },
    },
    {
      resolve: `gatsby-plugin-mdx`,
      options: {
        extensions: [".mdx", ".md"],
        gatsbyRemarkPlugins: [
          {
            resolve: `gatsby-remark-images`,
            options: {
              maxWidth: 590,
            },
          },
          {
            resolve: `gatsby-remark-responsive-iframe`,
            options: {
              wrapperStyle: `margin-bottom: 1.0725rem`,
            },
          },
          {
            resolve: `gatsby-remark-vscode`,
            options: {
              theme: `Andromeda`,
              extensions: ["andromeda"],
            },
          },
          {
            resolve: `gatsby-remark-copy-linked-files`,
          },
          {
            resolve: `gatsby-remark-smartypants`,
          },
        ],
      },
    },
    {
      resolve: `gatsby-plugin-google-analytics`,
      options: {
        // edit below
        // trackingId: `ADD YOUR TRACKING ID HERE`,
      },
    },
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `Gatsby Starter Blog`,
        short_name: `GatsbyJS`,
        start_url: `/`,
        background_color: `#ffffff`,
        theme_color: `#663399`,
        display: `minimal-ui`,
        // edit below
        icon: `content/assets/gatsby-icon.png`,
      },
    },
    {
      resolve: `gatsby-plugin-typography`,
      options: {
        pathToConfigModule: `src/utils/typography`,
      },
    },
  ],
}

The gatsby started I am using is gatsby-personal-starter-blog

And in the package.json the theme appears on the dependencies like this:

"andromeda": "https://github.com/EliverLara/Andromeda.git",

I can also see the theme in node_modules folder.

andrewbranch commented 4 years ago

I think this is the same issue as #80, and I’m starting to think this just doesn’t work if you invoke gatsby-cli globally. I’m assuming you’re using gatsby develop or gatsby build—do you get the same error if you run npx gatsby develop?

mustran commented 4 years ago

@andrewbranch thank you for the fast reply. Indeed, I am using gatsby-cli globally and thus the error does not appear when running the application via npx gatsby develop, which means that the theme is loading and working well.