Skip to content

[🐞] [v1->v2] builder dependencies need overriding #7803

@wmertens

Description

@wmertens

Which component is affected?

Qwik Runtime

Describe the bug

When migrating from v1 to v2, qwik libraries will still want the @builder.io dependencies.

This isn't a problem for the build, because the optimizer replaces those imports with @qwik.dev. However, typescript won't have types because it's looking in the wrong place.

Steps to reproduce

  • take a v1 project with a qwik lib dependency like e.g. @auth/qwik
  • run npx qwik migrate-v2
  • the types for @auth/qwik will be any

To fix direct dependencies of dependencies: add overrides

	"overrides": {
		"@builder.io/qwik": "npm:@qwik.dev/core",
		"@builder.io/qwik-city": "npm:@qwik.dev/router",
		"@builder.io/qwik-react": "npm:@qwik.dev/react",
		"@builder.io/eslint-plugin-qwik": "npm:@qwik.dev/eslint-plugin-qwik",
	},

To fix peer dependencies: add aliased dependencies so that they are used as peers when needed

in package.json:

	"devDependencies": {
		"@builder.io/qwik": "npm:@qwik.dev/core",
		"@builder.io/qwik-city": "npm:@qwik.dev/router",
	},

Other packages could be added too but they don't normally get used as peer dependencies and they would get installed.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions