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

[Bug] electron github action build error #289

Closed
haouarihk opened this issue Sep 9, 2023 · 3 comments · Fixed by #304
Closed

[Bug] electron github action build error #289

haouarihk opened this issue Sep 9, 2023 · 3 comments · Fixed by #304
Labels
bug Something isn't working

Comments

@haouarihk
Copy link

haouarihk commented Sep 9, 2023

Describe the bug
I'm working on a electron app that uses your transformers library (which is really handy).
It works fine when i try to package the app locally on my windows 11 machine,
but when i use github actions to package it, i get an error.

How to reproduce

  • i used this boilerplate electron-react-boilerplate
  • then install transformers.js in the release/app directory (because it says so)
  • import it in the main.ts(backend) and use an example.
  • remember to delete the analytics workflow (cuz it doens't work with private repos)
  • let it package for ubuntu linux, and it will fail with the error above.

Logs/screenshots
Error: release/app/node_modules/@xenova/transformers/types/processors.d.ts(173,5): error TS2416: Property '_call' in type 'SamImageProcessor' is not assignable to the same property in base type 'ImageFeatureExtractor'. Type '(images: any, input_points: any) => Promise<{ pixel_values: any; original_sizes: any; reshaped_input_sizes: any; input_points: Tensor; }>' is not assignable to type '(images: any) => Promise<any>'. Target signature provides too few arguments. Expected 2 or more, but got 1. Error: release/app/node_modules/@xenova/transformers/types/processors.d.ts(300,5): error TS2416: Property '_call' in type 'SamProcessor' is not assignable to the same property in base type 'Processor'. Type '(images: any, input_points: any) => Promise<any>' is not assignable to type '(input: any) => Promise<any>'. Target signature provides too few arguments. Expected 2 or more, but got 1. Error: release/app/node_modules/@xenova/transformers/types/transformers.d.ts(3,1): error TS2308: Module "./pipelines.js" has already exported a member named 'PretrainedOptions'. Consider explicitly re-exporting to resolve the ambiguity. Error: release/app/node_modules/@xenova/transformers/types/transformers.d.ts(4,1): error TS2308: Module "./pipelines.js" has already exported a member named 'PretrainedOptions'. Consider explicitly re-exporting to resolve the ambiguity. Error: release/app/node_modules/@xenova/transformers/types/transformers.d.ts(5,1): error TS2308: Module "./pipelines.js" has already exported a member named 'PretrainedOptions'. Consider explicitly re-exporting to resolve the ambiguity. Error: release/app/node_modules/@xenova/transformers/types/transformers.d.ts(6,1): error TS2308: Module "./pipelines.js" has already exported a member named 'PretrainedOptions'. Consider explicitly re-exporting to resolve the ambiguity. Error: release/app/node_modules/@xenova/transformers/types/transformers.d.ts(10,1): error TS2308: Module "./utils/tensor.js" has already exported a member named 'AnyTypedArray'. Consider explicitly re-exporting to resolve the ambiguity. Error: Process completed with exit code 2.

image
(don't worry about the "fake linting", i was just trying to figure out which command gave this error)

Environment

  • Transformers.js version: 2.6.0
  • Operating system (if applicable): github actions (probably linux)
@haouarihk haouarihk added the bug Something isn't working label Sep 9, 2023
@xenova
Copy link
Collaborator

xenova commented Sep 9, 2023

Hi there - yes we are aware of these typing issues and we're hoping to get it fixed soon. You should be able to skip this check for now with:

{
  "compilerOptions": {
    "skipLibCheck": true
  },
}

in tsconfig.json

@xenova
Copy link
Collaborator

xenova commented Sep 9, 2023

cc @kungfooman since you were able to fix some other typing issues, perhaps you can take a look at this too? 😇

@kungfooman
Copy link
Contributor

I have already referred part of this issue to the TypeScript team, but yea... they have more than 5.6k other open issues 🐌 👀

microsoft/TypeScript#46011 (comment)

I digged previously a bit into TS itself to make a PR to fix this, but haven't had time to fully do it yet. Anyway, it should be possible to fix it without requiring a PR in the first place... I will see what I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants