Module not found: Can't resolve '#minpath' during compilation
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- build-system, frontend
Research direction
Reproduce the CRA-based TypeScript setup with @uiw/react-textarea-code-editor and inspect the dependency path leading to vfile/lib and the unresolved #minpath import. Compare the installed package versions and build configuration, then verify that npm start compiles the example without the module-resolution error.
Written by the indexing model from the issue text.
Description
I'm using @uiw/react-textarea-code-editor in a React project to create a basic HTML code editor. The editor works fine in the component logic, but upon compiling the app, I receive the following error:
📁 Environment
Project type: React (TypeScript)
Code Editor: @uiw/react-textarea-code-editor
Build tool: React Scripts (CRA-based)
OS: Windows 11
Node: v20.18.0
NPM: v10.8.2
🧪 Steps to Reproduce
Install @uiw/react-textarea-code-editor
Use it in a component like this:
<CodeEditor
value={code}
language="html"
placeholder="Please enter HTML code"
onChange={(evn) => setCode(evn.target.value)}
/>
Run npm start
Compilation fails cannot resolve #minpath error from vfile\lib
✅ What I've Tried
npm update vfile
npm install #minpath
Code Snippet
import React, { useEffect, useState } from "react";
import CodeEditor from '@uiw/react-textarea-code-editor';
interface IHtmlCodeEditorProps {
htmlValue: string;
setHtmlValue: (value: string) => void;
readOnly?: boolean;
show?: boolean;
}
export const HtmlCodeEditor = (props: IHtmlCodeEditorProps) => {
const [code, setCode] = useState(props.htmlValue);
const handleCodeChange = (newCode: string) => {
setCode(newCode);
props.setHtmlValue(newCode);
};
return (
<div style={{ display: 'flex', flexDirection: 'column', gap: '10px', width: '100%' }}>
{props.show && (
<>
<CodeEditor
value={code}
language="html"
placeholder="Please enter HTML code."
onChange={(evn) => handleCodeChange(evn.target.value)}
padding={15}
style={{
backgroundColor: "#f5f5f5",
fontFamily: 'ui-monospace,SFMono-Regular,SF Mono,Consolas,Liberation Mono,Menlo,monospace',
}}
/>
<pre style={{ overflowY: "auto", whiteSpace: 'pre-wrap', wordWrap: 'break-word', overflow: 'auto' }}>
{code}
</pre>
</>
)}
</div>
);
};
- Dominant language
- TypeScript
- Stars
- 575
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
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.
More from uiwjs/react-textarea-code-editor
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
uiwjs/react-textarea-code-editor#186 · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
uiwjs/react-textarea-code-editor#182 · 3 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
uiwjs/react-textarea-code-editor#181 · 4 comments · 12 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 30/100
All issues in uiwjs/react-textarea-code-editor
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
0xMiden/bridge-portal#132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:tools bug good first issue help wanted priority:P2
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
TaewoooPark/Motifcode#14 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
newrelic-experimental/preflight#793 · 1 comment ·