question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adyen library installation into the project

See original GitHub issue

Describe the bug Dear development team, we have an unexpected issue with the library when we install it from the npm repository. The problem is that some imports aren’t working as expected.

The only technical detail I can share with you is that the implementation is for an Angular 9 project.

To Reproduce

  • Install the dependency with npm install @adyen/adyen-web
  • Start the project with npm run start (or whatever command you have to start the project)
ERROR in node_modules/@adyen/adyen-web/dist/src/core/RiskModule/RiskModule.d.ts:2:47 - error TS2307: Cannot find module '~/components/BaseElement'.
2 import BaseElement, { BaseElementProps } from '~/components/BaseElement';
node_modules/@adyen/adyen-web/dist/src/components/UIElement.d.ts:3:46 - error TS2307: Cannot find module '~/types'.
3 import { PaymentAction, PaymentAmount } from '~/types';
node_modules/@adyen/adyen-web/dist/src/components/ApplePay/ApplePay.d.ts:3:59 - error TS2307: Cannot find module '~/components/ApplePay/types'.
3 import { ApplePayElementProps, ApplePayElementData } from '~/components/ApplePay/types';
node_modules/@adyen/adyen-web/dist/src/components/Giropay/Giropay.d.ts:2:29 - error TS2307: Cannot find module '~/components/Redirect'.
2 import RedirectElement from '~/components/Redirect';
node_modules/@adyen/adyen-web/dist/src/components/PayPal/types.d.ts:1:31 - error TS2307: Cannot find module '~/types'.
1 import { PaymentAmount } from '~/types';
node_modules/@adyen/adyen-web/dist/src/components/PayPal/types.d.ts:3:35 - error TS2307: Cannot find module '~/components/PayPal/config'.
3 import { SUPPORTED_LOCALES } from '~/components/PayPal/config';
node_modules/@adyen/adyen-web/dist/src/components/PayPal/Paypal.d.ts:3:31 - error TS2307: Cannot find module '~/types'.
3 import { PaymentAction } from '~/types';
node_modules/@adyen/adyen-web/dist/src/components/Dragonpay/types.d.ts:1:31 - error TS2307: Cannot find module '~/types'.
1 import { PaymentAmount } from '~/types';
node_modules/@adyen/adyen-web/dist/src/components/Dragonpay/types.d.ts:2:22 - error TS2307: Cannot find module '~/language/Language'.
2 import Language from '~/language/Language';
node_modules/@adyen/adyen-web/dist/src/components/Vipps/Vipps.d.ts:1:29 - error TS2307: Cannot find module '../Redirect'.
1 import RedirectElement from '../Redirect';
node_modules/@adyen/adyen-web/dist/src/components/Dropin/Dropin.d.ts:3:31 - error TS2307: Cannot find module '~/types'.
3 import { PaymentAction } from '~/types';
node_modules/@adyen/adyen-web/dist/src/components/index.d.ts:4:22 - error TS2307: Cannot find module './Donation'.
4 import Donation from './Donation';
node_modules/@adyen/adyen-web/dist/src/components/index.d.ts:9:24 - error TS2307: Cannot find module './QiwiWallet'.
9 import QiwiWallet from './QiwiWallet';
node_modules/@adyen/adyen-web/dist/src/components/index.d.ts:10:22 - error TS2307: Cannot find module './Redirect'.
10 import Redirect from './Redirect';
node_modules/@adyen/adyen-web/dist/src/components/index.d.ts:11:27 - error TS2307: Cannot find module './SecuredFields'.
11 import SecuredFields from './SecuredFields';
node_modules/@adyen/adyen-web/dist/src/components/index.d.ts:12:18 - error TS2307: Cannot find module './Sepa'.
12 import Sepa from './Sepa';
node_modules/@adyen/adyen-web/dist/src/components/index.d.ts:13:62 - error TS2307: Cannot find module './ThreeDS2'.
13 import { ThreeDS2DeviceFingerprint, ThreeDS2Challenge } from './ThreeDS2';
node_modules/@adyen/adyen-web/dist/src/components/index.d.ts:19:22 - error TS2307: Cannot find module './Giftcard'.
19 import Giftcard from './Giftcard';
node_modules/@adyen/adyen-web/dist/src/components/index.d.ts:22:17 - error TS2307: Cannot find module './Ach'.
22 import Ach from './Ach';

The tested versions from Adyen npm repository were (and all of them give the same error code): 3.10.1 | 3.10.0 | 3.9.5 | 3.9.4

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Wiksnetcommented, Jan 27, 2021

@emidev98 (edited)… Finally got it working 😃 I should have add it to the project > architect > styles: [“node_modules/@adyen/adyen-web/dist/adyen.css”] in the angular.js

Thanks for help!

1reaction
emidev98commented, Jul 14, 2020

Thanks so much! I will test the version and if something goes wrong I’ll let you know ☺️

Read more comments on GitHub >

github_iconTop Results From Across the Web

Libraries | Adyen Docs
We provide server-side API libraries in several languages. ... Installing a library is not required, but will save you development time, because a...
Read more >
Adyen Web - npm
Create a .env file on your project's root folder following the example in env.default and fill in the environment variables. Install the ...
Read more >
Adyen - PyPI
Adyen Python Api. ... pip install Adyen Copy PIP instructions ... Project description. A Python client library for accessing Adyen APIs ...
Read more >
How to make payments using Adyen - YouTube
Initial Adyen Setup and Payment using Adyen NodeJS API Libraries | How to make payments using Adyen #AdyenSetup #AdyenNodeJSSDKpayment ...
Read more >
Adyen-php-api-library by Adyen - GitHub Pages
Installation · The preferred method is via RubyGems. · Download Release from GitHub: Go to our GitHub releases tab and download the zip...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found