twoslashes / twoslash

Markup for generating rich type information in your documentations ahead of time.
https://twoslash.netlify.app/
MIT License
506 stars 17 forks source link

Error: Cannot find module 'path' #5

Closed yazaldefilimone closed 8 months ago

yazaldefilimone commented 8 months ago
import { transformerTwoSlash } from 'shikiji-twoslash';

image

 ⨯ Error: Cannot find module 'path'
    at webpackEmptyContext (.../.next/server/app/[slug]/page.js:22:10)
    at requirePath (webpack-internal:///(rsc)/./node_modules/.pnpm/@typescript+vfs@1.5.0/node_modules/@typescript/vfs/dist/vfs.esm.js:592:132)
antfu commented 8 months ago

We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info. Please provide a minimal reproduction to reopen the issue. Thanks.

Why reproduction is required

Autsider666 commented 2 months ago

For anyone running into this issue when using next.js: https://github.com/shikijs/twoslash/issues/191#issuecomment-1928681921