Skip to content

Getting this working in a monorepo? #3

Description

@jparismorgan

Hi there, thank you for a great repo! I found this repo from your comment and was able to run it locally successfully.

In my project I'm trying to do something similar as you, i.e. use transformers.js in an Electron app. But the extra complication is that I'm working in a monorepo, so I have a structure like this:

/packages/ui
/packages/utils
/app/desktop-electron
/app/web-nextjs

I've tried to update this repo to use a similar structure in #2, and am able to run electron-forge start successfully. But when I run electron-forge make I get:

Uncaught (in promise) Error: Error invoking remote method 'transformers:run': Error: Cannot find module 'onnxruntime-node'
Require stack:
- /Users/parismorgan/repo/transformers-test/apps/desktop/out/make/zip/darwin/arm64/transformers-test.app/Contents/Resources/app/.webpack/main/index.js
Screenshot 2024-01-31 at 7 59 18 PM

And when I look in the app contents I don't see anything in there:

Screenshot 2024-01-31 at 8 01 48 PM

I saw that you created a PR to forge-externals-plugin related to monorepos: timfish/forge-externals-plugin#11, so I'm curious if you got this code working with a monorepo? If so I'd love any advice on how you did so.

Thank you again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions