docs icon indicating copy to clipboard operation
docs copied to clipboard

Preview bug with content reuse on Windows

Open StarfallProjects opened this issue 7 months ago • 3 comments

I suspect you have a bug with the mintlify dev preview and content reuse, possibly due to Windows.

  • OS: Windows 11 Pro
  • NodeJS: 22.14.0

I followed this doc: https://mintlify.com/docs/reusable-snippets

I created a snippets directory at the root of the project, containing a file manage-corporate-billing.mdx. Then imported like so: import ManageCorporateBilling from '/snippets/manage-corporate-billing.mdx';

I'm getting Could not find file when running mintlify dev.

I tried things like moving the snippets directory into the sub directory, or only using the snippet on a top level page. It never worked.

However, when I pushed and created a remote deploy preview, your preview build successfully rendered the snippet. This makes me suspect Windows issues (maybe as basic as handling the different / vs \?), as I've run into this sort of thing with different static site generators before.

StarfallProjects avatar May 08 '25 13:05 StarfallProjects

I have the same issue locally when running mintlify dev, I am getting this error: Could not find file /snippets/my-snippets.mdx - imported from test.mdx

Windows 11 Node: v23.7.0

NikolaosArgy avatar May 17 '25 11:05 NikolaosArgy

I ran into the same issue

Windows 11 Node: v22.13.1.

UPDATE: Just tested it on my MacBook and everything works as expected, so it seems to be a Windows related issue

NiclasDev63 avatar May 22 '25 23:05 NiclasDev63

Edit SOLVED:

I did a bad file reference. I need to change .tsx to .jsx 👍 thank you


Hi I am having trouble with the same thing on mac:

yarn mint:dev
Could not find file /snippets/my-snippet.tsx - imported from /pages/page1.mdx

âś“ preview ready

  local   → http://localhost:3000
  network → http://192.168.1.191:3000

press ctrl+c to exit the preview

Here is a repo where I isolated the issue: https://github.com/ajb413/MintBug

Screenshot of what I see in browser: screenshot

ajb413 avatar Aug 11 '25 15:08 ajb413