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

remark-twemoji is not installed? #8

Closed
Strahinja opened this issue May 31, 2020 · 4 comments
Closed

remark-twemoji is not installed? #8

Strahinja opened this issue May 31, 2020 · 4 comments

Comments

@Strahinja
Copy link

Strahinja commented May 31, 2020

I'm trying to use remark-twemoji in my Nuxt.js project. However, I'm getting a warning in the console during yarn generate, even after I installed remark-twemoji. No other Remark plugins I installed give errors.

Steps to reproduce:

  1. yarn add --dev remark-twemoji
    Output:

    [...]
    success Saved lockfile.
    success Saved 1 new dependency.
    info Direct dependencies
    └─ remark-twemoji@0.1.1
    info All dependencies
    └─ remark-twemoji@0.1.1
    Done in 62.47s.
    
  2. yarn generate

     WARN  remark-twemoji is not installed
    

Relevant part of my package.json after install:

{
    "devDependencies": {
    "remark-twemoji": "^0.1.1"
  }
}

Relevant part of my nuxt.config.js:

   content: {
        markdown: {
            plugins: [
                'remark-twemoji',
            ],
        },
    },

Running dir node_modules\remark-twemoji gives:

31.05.2020.  13:28    <DIR>          .
31.05.2020.  13:28    <DIR>          ..
31.05.2020.  13:09             1.489 index.js
31.05.2020.  13:27    <DIR>          node_modules
31.05.2020.  13:09             1.125 package.json
31.05.2020.  13:09             2.781 readme.md
@madiodio
Copy link
Owner

Hi @Strahinja, thanks for opening this issue.

This definitely weird. I'm not very familiar with Nuxt.js but on the docs there isn't any mention of content as a top-level config option here https://nuxtjs.org/guide/configuration. Are you using the latest version ?

Besides, if you could set up a repo that reproduces this with the your current version of nuxt I would very much appreciate it as an easier to fix this bug.

Thanks.

@Strahinja
Copy link
Author

Strahinja commented May 31, 2020

Thanks for the reply. I'm using the latest version of Nuxt.js, which is currently 2.12.2, and I'm also using @nuxt/content.

Here's the repository: Strahinja/remark-bug

In the meantime, I discovered there is one more package that issues warnings, namely remark-frontmatter. This could also be a bug in remark or @nuxt/content.

@madiodio
Copy link
Owner

Hey @Strahinja, got it solved by installing twemoji (yarn add twemoji --dev) which is marked as peerDependency from this module. This should definitely be highlighted in the docs. So i'm adding a note about Twemoji.

Also I believe nuxt/content should have a better error message because what was being outputted is really misleading. Maybe you could highlight it in the issue you mention in there.

Thanks again for opening this issue. If installing twemoji solves it for you I can close this.

@Strahinja
Copy link
Author

That solved the issue, thanks. :) It is likely the solution is similar for the other package (remark-frontmatter) as well.

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

No branches or pull requests

2 participants