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

failing setup #2

Open
rchl opened this issue Sep 21, 2024 · 2 comments
Open

failing setup #2

rchl opened this issue Sep 21, 2024 · 2 comments

Comments

@rchl
Copy link

rchl commented Sep 21, 2024

Following setup steps fails when running pnpm i:

. pnpm:devPreinstall$ npm run prepare:framework && npm run clean
│ > prepare:framework
│ > cd framework && pnpm i && npm run build
│ Scope: all 13 workspace projects
│ Lockfile is up to date, resolution step is skipped
│ Already up to date
│ Done in 843ms
│ > build
│ > tsc -b
│ error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
│ error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
│ error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
│ error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
│ error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
│ error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
│ error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
│ error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
│ error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
│ error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
│ error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
│ tsconfig.json(3,2): error TS5102: Option 'importsNotUsedAsValues' has been removed. Please remove it from your configuration.
│   Use 'verbatimModuleSyntax' instead.
└─ Failed in 2.5s at /usr/local/workspace/github/volarjs
 ELIFECYCLE  Command failed with exit code 1.
@rchl
Copy link
Author

rchl commented Sep 21, 2024

After removing that setting there is a type issue on building like:

│ packages/language-service/lib/utils/uriMap.ts(28,4): error TS2322: Type '() => Generator<URI, void, unknown>' is not assignable to ty…
│   Call signature return types 'Generator<URI, void, unknown>' and 'MapIterator<URI>' are incompatible.
│     The types returned by 'next(...)' are incompatible between these types.
│       Type 'IteratorResult<URI, void>' is not assignable to type 'IteratorResult<URI, undefined>'.
│         Type 'IteratorReturnResult<void>' is not assignable to type 'IteratorResult<URI, undefined>'.
│           Type 'IteratorReturnResult<void>' is not assignable to type 'IteratorReturnResult<undefined>'.
│             Type 'void' is not assignable to type 'undefined'.

I will never understand how this setup works ;)

@rchl
Copy link
Author

rchl commented Oct 7, 2024

I've figured out that this issue is due to bumping dependency versions (including typescript) in the lock file.

So then my questions are:

  • why do the framwork, services, vue, etc. repos don't pin the dependencies so that the things don't break when package lock is refreshed? For example typescript range is specified as latest.
  • why not use dependabot or renovate for bumping dependencies and making sure that any dependency updates go through CI (to avoid broken commits like volarjs/volar.js@eb9864d)?

The dependencies being locked would also help in pnpm linking dependencies to local repos since it can't link if there is existing pnpm-lock file pointing at upstream packages. The lock file needs to be deleted for pnpm to link local ones.

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

1 participant