monaco-editor-auto-typings icon indicating copy to clipboard operation
monaco-editor-auto-typings copied to clipboard

[BUG] TypeError: path.dirname is not a function

Open ClintH opened this issue 2 years ago • 10 comments

I'm also having the error as #9, 'path.dirname is not a function'. I have tried importing from 'monaco-editor-auto-typings/custom-editor' and passing in a monaco instance.

I am using Lit, TS & Vite and the latest version of monaco-editor-auto-typings.

Uncaught (in promise) TypeError: path.dirname is not a function
at AutoTypingsCore2. (chunk-D6HROQ3V.js?v=c1a822df:1459:94)
at step (chunk-D6HROQ3V.js?v=c1a822df:1308:23)
at Object.next (chunk-D6HROQ3V.js?v=c1a822df:1255:18)
at chunk-D6HROQ3V.js?v=c1a822df:1241:71
at new Promise ()
at __awaiter (chunk-D6HROQ3V.js?v=c1a822df:1223:14)
at AutoTypingsCore2.resolveContents (chunk-D6HROQ3V.js?v=c1a822df:1442:16)
at new AutoTypingsCore2 (chunk-D6HROQ3V.js?v=c1a822df:1353:14)
at Function. (chunk-D6HROQ3V.js?v=c1a822df:1370:24)
at step (chunk-D6HROQ3V.js?v=c1a822df:1308:23)

Here's a minimal repro

I am not savvy when it comes to build processes, so maybe there is a Vite/Rollup setting I'm missing.

Any tips appreciated! :)

ClintH avatar Nov 08 '22 15:11 ClintH