I accidentally upgraded the dependencies of my project. After that, when I ran the command to start the project, I kept getting an error:
/node_modules/.pnpm/vue-tsc@2.1.10_typescript@5.7.2/node_modules/vue-tsc/index.js:34 throw err; ^Search string not found: "/supportedTSExtensions =.*(?=;)/"Node.js v22.11.0
To solve this problem temporarily, I had to downgrade the versions. Specifically, I downgraded vue-tsc to version 2.0.29 and typescript to version 5.6.2.
Here is the updated part of the package.json
after the downgrade:
{ "scripts": { "build": "vue-tsc -b && vite build" }, "devDependencies": { "vue-tsc": "2.0.29", "typescript": "5.6.2", "vite": "^5.4.10", "@vitejs/plugin-vue": "^5.1.4" }}
This downgrade successfully fixed the issue. It seems that the problem is caused by the incompatibility between vue-tsc@2.1.10
and TypeScript 5.7.x
.