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

Error: The language "markdown" has no grammar #17

Open
YassinEldeeb opened this issue Sep 6, 2022 · 10 comments
Open

Error: The language "markdown" has no grammar #17

YassinEldeeb opened this issue Sep 6, 2022 · 10 comments

Comments

@YassinEldeeb
Copy link

YassinEldeeb commented Sep 6, 2022

After installing the plugin, rebuilding the project, and starting the server. I went to edit a content that had a rich-text field and as soon as it was rendered It crashed the site and the screen was completely white(nothing was rendered) with the following error in the console:

Error: The language "markdown" has no grammar

Video
https://vimeo.com/747016127

Versions:
@strapi/strapi: ^4.3.6
strapi-plugin-wysiwsg-react-md-editor: ^4.2.0

Any recommendations on what might have been wrong or how to fix it?

@rawestmoreland
Copy link

Experiencing the same issue.

@kwiat1990
Copy link

I'm getting the very same error with "strapi-plugin-wysiwsg-react-md-editor": "^4.2.0" and "@strapi/strapi": "^4.4.5" .

@kwinyyyc
Copy link
Owner

@kwiat1990 I have just tried "@strapi/strapi": "4.4.5" and "strapi-plugin-wysiwyg-react-md-editor": "^4.2.0" can run successfully

What is the node version you are using? Can you provide a minimal repo for me to check?

Also please install with npm install strapi-plugin-wysiwyg-react-md-editor, there was a typo in the package name

@kwiat1990
Copy link

Hi @kwinyyyc, I use node 16.4.2 and this is my package.json:

{
  "dependencies": {
    "@strapi/plugin-i18n": "^4.4.5",
    "@strapi/plugin-users-permissions": "^4.4.5",
    "@strapi/provider-email-nodemailer": "^4.4.5",
    "@strapi/provider-upload-cloudinary": "^4.4.5",
    "@strapi/strapi": "^4.4.5",
    "pg": "^8.8.0",
    "strapi-plugin-comments": "^2.2.0",
    "strapi-plugin-email-designer": "^2.1.1",
    "strapi-plugin-meilisearch": "^0.8.0",
    "strapi-plugin-placeholder": "^4.3.6",
    "strapi-plugin-slugify": "^2.2.3",
    "strapi-plugin-transformer": "^2.1.0"
  },
  "engines": {
    "node": ">=12.x.x <=16.x.x",
    "npm": ">=6.0.0"
  }
}

@kwinyyyc
Copy link
Owner

@kwiat1990 I tried the above config with node 16.4.2 still cannot replicate the issue, would be great if you can create a repo that can replicate the error.

@kwiat1990
Copy link

@kwiat1990 I tried the above config with node 16.4.2 still cannot replicate the issue, would be great if you can create a repo that can replicate the error.

Well, on the fresh installed and barebone Strapi instance it does work. What's more interesting, with all other plugin I have defined in plugins.js, it seems to be working as well, although they not used and perhaps this make some difference.

@kwinyyyc
Copy link
Owner

@kwiat1990 I tried the above config with node 16.4.2 still cannot replicate the issue, would be great if you can create a repo that can replicate the error.

Well, on the fresh installed and barebone Strapi instance it does work. What's more interesting, with all other plugin I have defined in plugins.js, it seems to be working as well, although they not used and perhaps this make some difference.

Interesting, does it mean it only happens on your live environment? Even if you try to create a new strapi instance with all the same plugins, the error won't show up?

@kwiat1990
Copy link

Not exactly. All the plugin are installed and configured but they're not connected to the same systems, e.g. Postgres, Cloudinary etc. In the fresh instance I used SQL database and didn't really connected to mentioned systems. Additionally, I didn't had my existing content-types and the actual content, so it's also a factor.

@minht11
Copy link

minht11 commented Dec 7, 2022

Experiencing same error with Strapi 4.5.2, installed plugin and it doesn't work on my dev environment.

@kwinyyyc
Copy link
Owner

I am trying to see if prebuilt the MD editor in common.js would work, published a beta version [email protected], can you give it a try? @minht11

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

5 participants