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

dist build / tsc failing with empty project #286

Closed
timojokinen opened this issue Mar 29, 2020 · 4 comments
Closed

dist build / tsc failing with empty project #286

timojokinen opened this issue Mar 29, 2020 · 4 comments
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@timojokinen
Copy link

timojokinen commented Mar 29, 2020

Describe the bug
tsc fails with an empty project.
There are errors in multiple files all concerning translation types

Example:

node_modules/@vendure/core/dist/entity/collection/collection.entity.d.ts:25:5 - error TS2416: Property 'translations' in type 'Collection' is not assignable to the same property in base type 'Translatable'.
  Type 'Translation<Collection>[]' is not assignable to type 'Translation<any>[]'.
    Type 'Translation<Collection>' is not assignable to type 'Translation<any>'.
      Type 'Translation<Collection>' is not assignable to type '{ [x: string]: string; }'.
        Property 'id' is incompatible with index signature.
          Type 'string | number' is not assignable to type 'string'.
            Type 'number' is not assignable to type 'string'.

     translations: Array<Translation<Collection>>;

To Reproduce
Steps to reproduce the behavior:

  1. Install vendure project with @vendure/create
  2. Settings: SQLite / TypeScript / Populate with sample data
  3. npm i / yarn
  4. npm run build / yarn build

Environment (please complete the following information):

  • @vendure/core version: 0.10.1
  • Nodejs version: v12.13.0
  • Database (mysql/postgres etc): SQLite
  • tsc: 6.14.4
@timojokinen timojokinen added the type: bug 🐛 Something isn't working label Mar 29, 2020
@michaelbromley
Copy link
Member

This is likely due to an incompatibility with TypeScript 3.8. Try to specify your TS version as 3.7.5 and try again.

In the next minor release I'll update to TS 3.8.

@timojokinen
Copy link
Author

I installed [email protected] locally and the build worked thanks.
Maybe the cli should install the correct version locally by default

@michaelbromley
Copy link
Member

Yes, I think it is a good idea since TypeScript doesn't really follow semantic versioning.

@michaelbromley
Copy link
Member

Fixed in a2fba13

michaelbromley added a commit that referenced this issue Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants