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

Build fails with chie dependency at ^0.2.0 #2

Open
nicolasff opened this issue Jul 28, 2023 · 0 comments
Open

Build fails with chie dependency at ^0.2.0 #2

nicolasff opened this issue Jul 28, 2023 · 0 comments

Comments

@nicolasff
Copy link

Hello,

package.json currently defines the dependency for chie as

"chie": "^0.2.0",

On my local checkout, chie@^0.2.0 was resolved to version 0.2.4 (although I don't see a v0.2.4 tag in the chie repo):

chie@^0.2.0:
  version "0.2.4"
  resolved "https://registry.yarnpkg.com/chie/-/chie-0.2.4.tgz#b5731eb526553fe07d75039b38dbe1e61f28520e"
  integrity sha512-QOx5vMiNOrCbZ7A2eI6XKM8IxF1U3DxdgQOSVZqsq/ESL5u+95JZCS/TK2105lFQgFrfEy74MzOVB5AVMj4AFw==

This causes the build to fail, with src/google-bard.ts failing to find APICredential from chie as it was not exported under this name at that time:

$ yarn build
yarn run v1.22.19
warning package.json: No license field
$ tsc
src/google-bard.ts:2:3 - error TS2305: Module '"chie"' has no exported member 'APICredential'.

2   APICredential,
    ~~~~~~~~~~~~~

src/google-bard.ts:51:43 - error TS2339: Property 'credential' does not exist on type 'GoogleBard'.

51     const url = new URL(apiEndpoint, this.credential.url);
                                             ~~~~~~~~~~

src/google-bard.ts:80:39 - error TS2339: Property 'credential' does not exist on type 'GoogleBard'.

80     const response = await fetch(this.credential.url, {
                                         ~~~~~~~~~~

src/google-bard.ts:98:20 - error TS2339: Property 'credential' does not exist on type 'GoogleBard'.

98       Origin: this.credential.url,
                      ~~~~~~~~~~

src/google-bard.ts:99:21 - error TS2339: Property 'credential' does not exist on type 'GoogleBard'.

99       Referer: this.credential.url,
                       ~~~~~~~~~~

src/google-bard.ts:100:20 - error TS2339: Property 'credential' does not exist on type 'GoogleBard'.

100       Cookie: this.credential.cookie,
                       ~~~~~~~~~~


Found 6 errors in the same file, starting at: src/google-bard.ts:2

error Command failed with exit code 2.

Changing the dependency to chie@^0.2.9 in package.json addresses the issue, I was able to build the extension after making this change and all errors went away.

Best of luck for the launch!

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