Issue react-md-editor@4.0.5 - Expected usable value but received an empty preset
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 201
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Description
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"]
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the error using the supplied tsconfig and the @uiw/react-md-editor/esm/index.js entry shown in the stack trace. Inspect the preset handling around index.js lines 1076 and 1110, then compare the module setup with the reported react-markdown configuration. Done means the cause is identified and the editor no longer throws the empty-preset error in the reported setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript, webpack
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100