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

core_AbstractPage_client is not defined in production #442

Open
imyosh opened this issue Jun 23, 2024 · 2 comments
Open

core_AbstractPage_client is not defined in production #442

imyosh opened this issue Jun 23, 2024 · 2 comments

Comments

@imyosh
Copy link

imyosh commented Jun 23, 2024

Hello, I have been using the package with electron 26.2.1 in the main process (node.js)

it works nicely in the dev mood, but in production it produce the attached error about core_AbstractPage_client being undefined

it's can be produced by just setting up a function with:

  const anthropic = new Anthropic({
    apiKey: "****"
  });

appreciate your help!

Screenshot 2024-06-22 201028

@rattrayalex
Copy link
Collaborator

Hmm, we don't explicitly support electron. What version of Node is it running under the hood? Or does it use another engine?

@linus-amg
Copy link
Contributor

linus-amg commented Jul 23, 2024

@imyosh I've created an example repository where the anthropic ai sdk is used in an electron app https://github.com/linus-amg/electron-anthropic-sdk

I'm currently on MacOS so I did not try in an environment which uses windows (as you seem to do), but I hope it works for you too. Don't hesitate to ping me if you have any additional questions.

Parts of the code which might matter when you try to implement this yourself:

hope this helps, good luck!

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

3 participants