-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Issue with TS4.9 - 'AbortSignal' was also declared here. #51567
Comments
This are the packages in my package.json:
|
I ran into this in my project with |
Wouldn't it be quite natural to reference both if you had a web project with node build scripts? It looks like the goal is to fix it in the node types DefinitelyTyped/DefinitelyTyped#60868 but not sure how long that will take... |
I'm pretty sure that this is just a case of needing to update types. We fixed this same issue in Monaco a week or so ago by updating deps. If you don't depend on these directly, try relocking your project. |
I agree. I saw there were open related issues so didn't verify but I see there are other closed issues which explicitly updated node types for 4.9. Thanks Jake! |
I got this error at first after dooing a "npm-upgrade" (wich upgrades all packages i reference) and then doing a "npm i" |
As Jake said, you may have a transitive dependency with out of date node types. In that case try to delete your lock file and then run |
I did this. I deleted the lock file. |
fixed it by adding @types/node to my dev dependencies
|
That's definitely strange and unexpected but without seeing your setup it's hard to say what went wrong. If you're okay keeping an unused dev dependency, that's probably a solid solution. |
You see my setup. Above I posted every Dependecy I have. |
Took a quick look and it was a problem with transitive dependencies, I had not gotten the steps to properly refresh your lockfile correct. You also need to delete node_modules folder. Here's the steps I took in your repo:
|
Thanks |
It used to be that not having lockfiles made dependency management hard. Now deleting the lockfile is a valid troubleshooting method to fix dependency issues. We've come full circle, ladies and gentlemen! 😄 |
yes, and now you also need to delete node_modules folder... this i found modt discusting |
…dencies This relates to the release of TypeScript 4.9, which caused our build to break due to type errors. As suggested in microsoft/TypeScript#51567, this is fixed by updating all sub-dependencies of the project.
This issue has been marked as 'External' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
* chore(deps-dev): bump typescript from 4.8.4 to 4.9.3 Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.8.4 to 4.9.3. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v4.8.4...v4.9.3) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Install @types/node to fix TS issue Ref: https://github.com/microsoft/TypeScript/issues/51567\#issuecomment-1318523182 * Add @type/nodes to root package.json These are the deps for Storybook. The build fails without. Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Robin Métral <robin.metral@sumup.com>
QUICK FIX*
|
This may happen when another dependency installs an older
In my case I had You don't need to install |
npm upgrade Works 100%! |
|
This also fixes a conflict between dependencies, as per microsoft/TypeScript#51567
Details: microsoft/TypeScript#51567 Signed-off-by: Bofu Chen (bafu) <bofu@numbersprotocol.io>
I want to use the `satsifies` operator introduced in 4.9 [1]. Ran `npm install typescript@4.9.5 typedoc@latest`, and then upgraded @types/node to ^18.0.0, to fix [2]. The TypeScript upgrade introduced one compilation error, which I’ve fixed here. I’m targeting the v2 integration branch (which uses the latest webpack) since trying to upgrade TypeScript on `main` is giving some webpack errors that don’t seem worth trying to understand. [1] https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator [2] microsoft/TypeScript#51567
This requires a TypeScript update as the newest version requires TypeScript 4.7 or later, which in turn requires pinning the @types/node dependency to a new-enough version to avoid a bug. See microsoft/TypeScript#51567
This should be |
- fixes issues with typescript and node ts types microsoft/TypeScript#51567 (comment) -add chrome pwa debugger - cleanup settings.json file - run npm audit fix
Fixed by deleting lockfile and node_modules |
Bug Report
After upgradeing to Typescript 4.9 I get now this error.
The text was updated successfully, but these errors were encountered: