-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pnpm dev crash: TS2354: This syntax requires an imported helper but module 'tslib' cannot be found. #1727
Comments
Good to know, thanks, I don't remember why this was enabled though, I just removed it and it built without error so I'll push this |
Actually it started crashing again.
Slight variation after commenting that line in watch-cli.js:549:
|
I don't know what changed, but now when there is an error in my code, the whole I can reproduce this 100%. I found a few references: |
Can't reproduce, but I may be stumble upon this issue once and added importHelpers for that reason. Can you try to delete node_modules folders and dist folders and install and build again? |
I did a git clean to remove everything and I also removed but the issue persists. my
After cleaning the message is slightly different (I mispelled
|
This is not the same error, it's an issue with your code here |
Yes, but that's the whole point. When there is an error in my code, reporting this error crashes When developing forge plugin, the app automatically reloads when the code change, but now when there is a typo in the code, the whole |
Got it. that comes from "noEmitOnError": true. I added it recently because we could basically build the app with an error. I'll see if I can disable this when running dev |
Ok I was able to fix the
Must be added to the Now that this is fixed, changing So it is actually two separate issues that got mixed. One issue is that |
So the fix for the
below this line typebot.io/packages/forge/cli/index.ts Line 197 in 503060c
and
below this one: typebot.io/packages/forge/cli/index.ts Line 171 in 503060c
I guess the rest of the uses of |
I'm not sure about this to be honest we don't import tslib |
Please let me know how I can reproduce the error |
Ok I did more tests, and I can no longer reproduce it 100%. It does happens sometimes but not always. It seems to depend on the order which viewer:dev, nextjs:dev and react:dev appears in the logs, but I am not sure as the logs are widely different when it occurs vs when it does not occur. But I can confirm that my proposed fix is not actually a fix, it just happened to work at the right time. And I guess that's why I thought the first fix was also a fix. I guess I was unlucky because I tried about 10 times and it seemed to work, but now, with more load on my dev server with other tasks, it is happening a lot less. I suggest we close this and keep it for reference if it happens again. I am sorry for taking so much of your time with this. |
No worries, it helps a lot, you create good issues 🙏 |
I am not sure if this is a typebot issue, but I open this issue to document this and give a workaround.
For some reason I wasn't able to pinpoint, I started hitting and issue where
pnpm dev
would crash with:I searched a bit and I was unable to find a definitive explanation to this issue.
But in case you encounter it, my fix was to change
importHelper
tofalse
in the following file:typebot.io/packages/lib/tsconfig.json
Line 7 in 37ef8fe
change to:
The text was updated successfully, but these errors were encountered: