wl-online-payments-direct / sdk-client-js

Other
3 stars 2 forks source link

Missing file in node_modules and peer dependencies #9

Closed TomasJurksys closed 2 months ago

TomasJurksys commented 2 months ago

Hello,

I have an issue after installing onlinepayments-sdk-client-js dependency. I tried both 3.1.0 and 3.0.2 versions.

The project is in Angular 17 Node version 20.12.0 NPM version 10.5.0

Steps that we did

  1. npm install onlinepayments-sdk-client-js
  2. import { Session } from 'onlinepayments-sdk-client-js';

After these first two steps in package directory node_modules/onlinepayments-sdk-client-js/dist/types/src one file and a couple of peer dependencies are missing. Below you can find the errors. The file BasicPaymentItem is not installed but it is at your github repository https://github.com/wl-online-payments-direct/sdk-client-js/blob/master/src/BasicPaymentItem.ts

Error: node_modules/onlinepayments-sdk-client-js/dist/types/src/BasicPaymentItems.d.ts:2:64 - error TS2307: Cannot find module './BasicPaymentItem' or its corresponding type declarations.

2 import type { BasicPaymentItem, BasicPaymentItemByIdMap } from './BasicPaymentItem';
                                                                 ~~~~~~~~~~~~~~~~~~~~

Error: node_modules/onlinepayments-sdk-client-js/dist/types/src/types/applepay.types.d.ts:1:23 - error TS2688: Cannot find type definition file for 'applepayjs'.

1 /// <reference types="applepayjs" />
                        ~~~~~~~~~~

Error: node_modules/onlinepayments-sdk-client-js/dist/types/src/types/applepay.types.d.ts:11:11 - error TS2503: Cannot find namespace 'ApplePayJS'.

11     data: ApplePayJS.ApplePayPaymentToken;
             ~~~~~~~~~~
worldline-direct-support-team commented 2 months ago

Hello Thomas,

Thank you for bringing this to our attention! This is indeed an issue, and we will be looking to release a fix as soon as possible.

In the meantime, if you enable skipLibCheck in tsconfig.json you should be able to run your build without issues.

Again thank you! And Kind regards, Worldline Support Team

worldline-direct-support-team commented 2 months ago

This issue has been fixed with version 3.1.1.