strapi-plugin-wysiwyg-react-md-editor icon indicating copy to clipboard operation
strapi-plugin-wysiwyg-react-md-editor copied to clipboard

Error: The language "markdown" has no grammar

Open YassinEldeeb opened this issue 3 years ago • 10 comments

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?

YassinEldeeb avatar Sep 06 '22 19:09 YassinEldeeb

Experiencing the same issue.

rawestmoreland avatar Oct 07 '22 02:10 rawestmoreland

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

kwiat1990 avatar Oct 21 '22 17:10 kwiat1990

@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

kwinyyyc avatar Oct 23 '22 08:10 kwinyyyc

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"
  }
}

kwiat1990 avatar Oct 23 '22 09:10 kwiat1990

@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.

kwinyyyc avatar Oct 23 '22 10:10 kwinyyyc

@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.

kwiat1990 avatar Oct 23 '22 10:10 kwiat1990

@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?

kwinyyyc avatar Oct 23 '22 13:10 kwinyyyc

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.

kwiat1990 avatar Oct 23 '22 14:10 kwiat1990

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

minht11 avatar Dec 07 '22 12:12 minht11

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

kwinyyyc avatar Dec 10 '22 10:12 kwinyyyc