[typescript] cannot build project using [email protected]

Hi,

It seems like there is a dependency issue with the NodeJS package from version 35.0.0 and above.

I cannot build my typescript project unless I use 34.0.1.

node_modules/square/dist/types/authProvider.d.ts:2:153 - error TS2307: Cannot find module '@apimatic/authentication-adapters/lib/compositeAuthenticationAdapter' or its corresponding type declarations.

2 export declare function createAuthProviderFromConfig(config: Partial<Configuration>): import("@apimatic/core-interfaces").AuthenticatorInterface<import("@apimatic/authentication-adapters/lib/compositeAuthenticationAdapter").CompositeAuthParams<"global", {
                                                                                                                                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error in node_modules/square/dist/types/authProvider.d.ts:2

Running

npm i @apimatic/authentication-adapters

fixes the build problem it seems but that should not be required. Also it leads to a following runtime error anyway.

TypeError: core_interfaces_1.combineHttpInterceptors is not a function

Thanks.

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Stay Current with the Node.js SDK Version
Square Node.js SDK Quickstart
Using the Square Node.js SDK

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

Hey @nymkappamempoolspace

sorry to see you are running into this issue. I’m unable to reproduce issue this myself in a TS project I stood up locally using Square version 37.0.0

If there is any other info you can provide, such as pieces of code that are invoking the square SDK, or the environment in which you are running the SDK could be helpful to help me debug with you.

Lastly, just confirming - have you deleted your node_modules directory and tried to do a fresh install of your dependencies with square at version 37.0.0? If you do this, I’d suggest uninstalling the apimatic package you manually installed as a dependency first, and then doing the reinstall.

Thanks for your patience :slight_smile: