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

Type issues on upgrade #780

Closed
kvpavan opened this issue Apr 6, 2024 · 2 comments
Closed

Type issues on upgrade #780

kvpavan opened this issue Apr 6, 2024 · 2 comments

Comments

@kvpavan
Copy link

kvpavan commented Apr 6, 2024

Issue summary

I recently upgraded from 7.6 to 9.7 and I'm getting so many type issues on build
and my env is

  • @shopify/shopify-api version:9.7.0
  • Node version:21.4.0
  • Operating system:Windows10

Steps to reproduce the problem

1.npm update package@latest
1.tsc --build

Debug logs


node_modules/@shopify/shopify-api/runtime/http/types.d.ts:30:63 - error TS2304: Cannot find name 'fetch'.

30 export type AbstractFetchFunc = (...params: Parameters<typeof fetch>) => Promise<Response>;
                                                                 ~~~~~

node_modules/@shopify/shopify-api/runtime/http/types.d.ts:30:82 - error TS2304: Cannot find name 'Response'.

30 export type AbstractFetchFunc = (...params: Parameters<typeof fetch>) => Promise<Response>;
                                                                                    ~~~~~~~~

node_modules/@shopify/shopify-api/runtime/http/types.d.ts:1:23 - error TS2688: Cannot find type definition file for '@cloudflare/workers-types'.

1 /// <reference types="@cloudflare/workers-types" />
                        ~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@shopify/graphql-client/dist/graphql-client.d.ts:4:15 - error TS2304: Cannot find name 'HeadersInit'.

4     headers?: HeadersInit;
                ~~~~~~~~~~~

node_modules/@shopify/graphql-client/dist/graphql-client.d.ts:6:15 - error TS2304: Cannot find name 'Response'.

6 }) => Promise<Response>;
                ~~~~~~~~

node_modules/@shopify/graphql-client/dist/graphql-client.d.ts:14:16 - error TS2304: Cannot find name 'Response'.

14     response?: Response;
                  ~~~~~~~~

node_modules/@shopify/graphql-client/dist/graphql-client.d.ts:38:19 - error TS2304: Cannot find name 'Response'.

38         response: Response;
                     ~~~~~~~~

node_modules/@shopify/graphql-client/dist/graphql-client.d.ts:45:24 - error TS2304: Cannot find name 'Response'.

45         lastResponse?: Response;
                          ~~~~~~~~

node_modules/@shopify/graphql-client/dist/graphql-client.d.ts:73:49 - error TS2304: Cannot find name 'Response'.

73     fetch: (...props: RequestParams) => Promise<Response>;
                                                   ~~~~~~~~

node_modules/@shopify/graphql-client/dist/graphql-client.d.ts:101:39 - error TS2304: Cannot find name 'Response'.

101 type ResponseWithType<T = any> = Omit<Response, "json"> & {
                                          ~~~~~~~~

node_modules/@shopify/graphql-client/dist/graphql-client.d.ts:171:15 - error TS2304: Cannot find name 'HeadersInit'.

171     headers?: HeadersInit | undefined;
                  ~~~~~~~~~~~

node_modules/@shopify/shopify-api/runtime/crypto/crypto.d.ts:2:24 - error TS2304: Cannot find name 'Crypto'.

2 declare let cryptoVar: Crypto;
                         ~~~~~~

node_modules/@shopify/shopify-api/runtime/crypto/crypto.d.ts:3:43 - error TS2304: Cannot find name 'Crypto'.

3 export declare function setCrypto(crypto: Crypto): void;
                                            ~~~~~~

node_modules/@shopify/shopify-api/runtime/crypto/crypto.d.ts:1:23 - error TS2688: Cannot find type definition file for '@cloudflare/workers-types'.

1 /// <reference types="@cloudflare/workers-types" />
                        ~~~~~~~~~~~~~~~~~~~~~~~~~


Found 14 errors.
@paulomarg paulomarg transferred this issue from Shopify/shopify-api-js Apr 11, 2024
Copy link
Contributor

github-actions bot commented May 2, 2024

We are closing this issue because we did not hear back regarding additional details we needed to resolve this issue. If the issue persists and you are able to provide the missing clarification we need, feel free to respond and reopen this issue.

We appreciate your understanding as we try to manage our number of open issues.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 2, 2024
@ryb73
Copy link

ryb73 commented May 8, 2024

@kvpavan were you able to resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants