-
Notifications
You must be signed in to change notification settings - Fork 133
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
An error occurs when debugging a TypeScript project #3199
Comments
This reproduces on v1.7.1 also. Seems like a templates issue |
This was due to a recent release of the "@azure/functions" types package which references "Buffer" for the first time. Filed this issue to investigate if we can fix on the types side, but I'm not optimistic: Azure/azure-functions-nodejs-worker#587 The "template" for TypeScript projects is owned by the VS Code extension, so it might be on the extension to address. We went back and forth on whether "@types/node" should be included in TypeScript projects by default in the past (for example here), but that was when |
A postinstall script could check the installed node version and install the corresponding |
Do you have examples of other types packages doing that? I don't really want to re-invent the wheel here as I think it's a very common thing for types packages to reference node types. I'd rather just follow what other popular packages are doing |
Yeah I don't have any examples. 😄 I just tested out enabling the I know that's not optimal, but TypeScript is exploring better options for skipLibCheck. |
@alexweininger Would you be fine if we add If you're fine with the change, I'm happy to submit a PR myself. I will have to make the same change in core tools as well |
I think it would be sensible to do that, with either v16 (active LTS) or v14 (maintenance LTS). Everything below 14 is out-of-support, so I don't feel bad if we scaffold e.g. v14 and a user on v12 has issues. They should not be on v12. |
Sounds good to me 👍 |
Verified this issue on the extension build 20220606.8, it has been fixed. |
Thank you @v-ruizh! |
OS: All
Build Version: 20220526.13
Repro Steps:
Expect:
Succeed to debug a TypeScript project.
Actual:
An error occurs when debugging a TypeScript project.
More Info:
This issue does not reproduce after executing command "npm i --save-dev @types/node".
The text was updated successfully, but these errors were encountered: