create-single-spa
create-single-spa copied to clipboard
Error typescript version dependency
Reproduce
Install a new version of typescript and install package webpack-config-single-spa-ts
Error
error An unexpected error occurred: "could not find a copy of typescript to link in /app/node_modules/webpack-config-single-spa-ts/node_modules".
Posible solution
Remove typescript of dependencies from package webpack-config-single-spa-ts
As @guilhermegregio states, I don't think neither webpack-config-single-spa-ts
nor webpack-config-single-spa-react-ts
actually require having TypeScript as dependency. For the moment, we have decided to add both configurations to our project (manually adding both JS config files), removing such dependencies and adding fork-ts-checker-webpack-plugin
. This way we have been able to properly bump TS to latest version and everything is working as expected.
Hello, any updates on this issue?
Same problem here =/
I will take a look at this over the weekend.
Same here with [email protected] as a devDependency on my project. If I downgrade to typescript 4 or lower, the error is gone, but my project can't use lower than 5.
I was unable to reproduce the issue by creating a new root config / application, and upgrading to the latest typescript 5 version. I suspect the problem is the declaration of typescript in both dependencies, and peer dependencies in the webpack-config-single-spa-ts package.
Can you please specify which package manager you are using, and post a small reproduction repository?
Hello, I tried to reproduce and still exists. Steps to reproduce:
- Create new
single-spa root config
project withyarn create single-spa
- Update dependencies to:
- "single-spa": "^6.0.2",
- "single-spa-layout": "^2.2.0"
- Run
yarn install
- Upgrade typescript dependency to "typescript": "^5.6.2",
- Run
yarn install
and error iserror Invariant Violation: could not find a copy of typescript to link in
I am able to replicate the issue following those steps. Note that pnpm doesn't seem to have the same issue, so perhaps it is yarn-specific.