Skip to content
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

Error typescript version dependency #377

Open
guilhermegregio opened this issue May 8, 2023 · 11 comments
Open

Error typescript version dependency #377

guilhermegregio opened this issue May 8, 2023 · 11 comments
Assignees

Comments

@guilhermegregio
Copy link
Contributor

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".

@guilhermegregio
Copy link
Contributor Author

Posible solution

Remove typescript of dependencies from package webpack-config-single-spa-ts

@adripanico
Copy link

adripanico commented Aug 2, 2023

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.

@Gedzis
Copy link

Gedzis commented Jun 10, 2024

Hello,
any updates on this issue?

@ValchanOficial
Copy link

Same problem here =/

@MilanKovacic MilanKovacic self-assigned this Aug 15, 2024
@MilanKovacic
Copy link

I will take a look at this over the weekend.

@ludeviance
Copy link

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.

@MilanKovacic
Copy link

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?

@Gedzis
Copy link

Gedzis commented Sep 20, 2024

Hello,
I tried to reproduce and still exists. Steps to reproduce:

  1. Create new single-spa root config project with yarn create single-spa
  2. Update dependencies to:
  • "single-spa": "^6.0.2",
  • "single-spa-layout": "^2.2.0"
  1. Run yarn install
  2. Upgrade typescript dependency to "typescript": "^5.6.2",
  3. Run yarn install and error is error Invariant Violation: could not find a copy of typescript to link in

@joeldenning
Copy link
Member

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.

@Taifunov
Copy link

Up

@felipe-gustavo
Copy link

felipe-gustavo commented Oct 26, 2024

I got this recently, add the specific typescript version on package.json solves it.

Instead assign the typescript version with caret (^4.4.3), try to assign the specific version (4.4.3)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants