8000 Issue react-md-editor@4.0.5 - Expected usable value but received an empty preset · Issue #683 · uiwjs/react-md-editor · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Issue react-md-editor@4.0.5 - Expected usable value but received an empty preset #683

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

Open
volosincu opened this issue Mar 31, 2025 · 1 comment

Comments

@volosincu
Copy link
volosincu commented Mar 31, 2025

I had this error. Could not find the cause but I think it is caused by the module type.
In the project I'm using react-markdown with rehype plugins and there unified doesn't have this issues.

index.js:1110 Uncaught (in promise) Error: Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither
    at addPreset (index.js:1110:1)
    at apply.use (index.js:1076:1)
    at ./node_modules/@uiw/react-md-editor/esm/index.js (index.js:10:1)
    at __webpack_require__ (bootstrap:19:1)
    at sharing:50:1
    at __webpack_require__.m.<computed> (main.js:494:34)
    at __webpack_require__ (bootstrap:19:1)

ts-config

{
  "compilerOptions": {
    "jsx": "react",
    "module": "ESNext",
    "noImplicitAny": true,
    "outDir": "./build/",
    "preserveConstEnums": true,
    "removeComments": true,
    "sourceMap": true,
    "target": "es5",
    "esModuleInterop": true,
    "moduleResolution": "bundler",
    "resolveJsonModule": true,
    "allowSyntheticDefaultImports": true,
    "typeRoots": ["node_modules/@types", "./src/@types"]
  },
  "include": ["src/**/*", ".eslintrc.js"],
  "exclude": ["node_modules"]
}

Image

@volosincu volosincu changed the title Issue react-md-editor@4.0.5 Issue react-md-editor@4.0.5 - Expected usable value but received an empty preset Mar 31, 2025
@jaywcjlove
Copy link
Member

{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"declaration": true,
"baseUrl": ".",
"jsx": "react-jsx",
"noFallthroughCasesInSwitch": true,
"noEmit": true,
"types": ["jest", "node"]
}
}

I also use the ESNext module, but I haven’t encountered this issue in my project. I’m not sure how to resolve your problem. I recommend checking the versions of react-md-editor and the related plugins, or trying to adjust the module configuration to see if it helps. @volosincu

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
0