metz-sh / simulacrum

Code-playground to visualise complex engineering flows.
https://metz.sh
Apache License 2.0
400 stars 28 forks source link

Self-host compilation errors after stop and up again #35

Closed raafael closed 1 month ago

raafael commented 2 months ago

In self host I close de browser and stop docker compose then after start up again I'm getting some compilation errors like it couldn't find Map or array types

error:Cannot find name 'Map'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2015' or later.

error:Property 'push' does not exist on type '{}'.

error:Property 'find' does not exist on type '{}'.

error:Property 'filter' does not exist on type '{}'.

How can I solve them?

iostreamer-X commented 2 months ago

Hey @raafael

When starting, the app loads core .d.ts files from a CDN. This errors usually happens when it's not able to fetch those.

I have been following it since this issue popped up on sentry as well but rarely. And it goes away after a refresh(full preferably).

Can you please check:

Meanwhile, I will be working on bundling those files with the app itself so that it doesn't have load them from an unreliable CDN.

raafael commented 2 months ago

Hi @iostreamer-X !

Thank you for your fast reply, I stop docker clean cache and everything else in chrome but the problem persists. The print below is from console and in network there is no call to .d.ts files. image

So I tried open chrome in private navigation then I notice the .d.ts files load in network tab.

When you said try a hard refresh that is a command that I can do that I'm missing?

iostreamer-X commented 2 months ago

I think cleaning cache is the equivalent of hard refresh.

I tried to reproduce it locally but no luck. Any chance you can share the code?

iostreamer-X commented 1 month ago

Hey @raafael I have merged the PR which solves for bootstrapping TS libs: https://github.com/metz-sh/simulacrum/pull/41

Can you please rebuild and try again?

raafael commented 1 month ago

Hy @iostreamer-X I did a pull from seflhost, build and deploy it into our k8s and it seems to me that is every thing work. Thank you for your amazing job