codesandbox-client icon indicating copy to clipboard operation
codesandbox-client copied to clipboard

Cannot find module '' or its corresponding type declarations

Open vinpac opened this issue 2 years ago • 6 comments

🐛 bug report

Preflight Checklist

  • [x] I have read the Contributing Guidelines for this project.
  • [x] I agree to follow the Code of Conduct that this project adheres to.
  • [x] I have searched the issue tracker for an issue that matches the one I want to file, without success.

Description of the problem

I've published a package called windstitch, so I'm creating this sandbox to demonstrate it. Unfortunately, CodeSandbox is failing to find its types. The package is working but has any types.

image

I'm using it in another project and the types work fine. Let me know if I have to set up anything extra so it works fine.

How has this issue affected you? What are you trying to accomplish?

To Reproduce

Link to sandbox: link

Your Environment

Software Name/Version
Сodesandbox b8d98f80d
Browser Chrome Version 100.0.4896.88 (Official Build) (arm64)
Operating System Mac OS 12.2.1

vinpac avatar Apr 18 '22 14:04 vinpac

Add @types/react to the sandbox solves the problem. In Embed mode the problem persists. Any reason why?

vinpac avatar Apr 19 '22 13:04 vinpac

Hey @vinpac - How long after you had made the changes did you check the embed? It may have been using a cached version

JamesACS avatar Apr 29 '22 15:04 JamesACS

Hey @JamesACS . Yes I did! On the Share Panel that previews the Embed CodeSandbox the types don't work already.

vinpac avatar May 03 '22 16:05 vinpac

I have the same issue with my package @fairfox/adorn It doesn't find the types and it doesn't see the latest version.

https://codesandbox.io/s/adorn-react-0vbwqo?file=/src/App.tsx

AlexJeffcott avatar May 07 '22 09:05 AlexJeffcott

Thanks for your patience; this is due to an issue with the Yarn search index backed by Algolia that comes up from time to time, basically the index becomes desynced with new entries so instead of the standard 10-20 minutes for your package to appear, it can take a day or two.

You can add your package manually to Package.json though in these cases!

JamesACS avatar May 11 '22 10:05 JamesACS

Hello @JamesACS 👋🏼

We are having the same issue Cannot find module '@payfit/midnight' or its corresponding type declarations. with our package (see sandbox).

To give you more context, this package was private until recently (22/08/2022, 2 days ago) and is now public. But it's seems that the sandbox cannot find the types yet.

After a little debugging I found out that some codesandbox internal API is still returning a 403. Capture d’écran 2022-08-24 à 10 37 47

While another codesandbox internal API is returning a 520 Capture d’écran 2022-08-24 à 10 39 20

Do you have any idea of why this is occurring ? Is there any next steps that we should take ? I don't want to open a new issue and bother codesandbox maintainers for nothing ^^

nicolastoulemont avatar Aug 24 '22 08:08 nicolastoulemont