I have an Ionic V3 app that I publish as a PWA.
I want to save card information using Firebase as backend (node.js).
When I install Stripe using npm install -save stripe (installs the latest version) and build my app, I get a bunch of typescript errors and the build fails.
The versions of various packages in my app:
“ionic-angular”: “3.9.2”,
“firebase”: “^4.12.1”
“typescript”: “~2.6.2”
“rxjs”: “5.5.11”,
“angularfire2”: “^5.0.0-rc.6”,
“devDependencies”: {
“@ionic/app-scripts”: “3.1.11”,
“typescript”: “~2.6.2”
},
“engines”: {
“node”: “8”
},
I know these versions are old but I have other dependencies that forces me to keep these versions. I can get everything else working well except Stripe’s latest version.
The error messages I get are such as:
[16:00:54] typescript: node_modules/@types/node/globals.d.ts, line: 261
Cannot find name 'bigint'.
L260: writeBigUInt64BE(value: bigint, offset?: number): number;
L261: writeBigUInt64LE(value: bigint, offset?: number): number;
L262: writeUIntLE(value: number, offset: number, byteLength: number): number;
[16:00:54] typescript: node_modules/@types/node/fs.d.ts, line: 80
Cannot find name 'AsyncIterableIterator'.
L80: [Symbol.asyncIterator](): AsyncIterableIterator<Dirent>;
[16:00:54] typescript: node_modules/@types/node/fs.d.ts, line: 2222
Cannot find name 'bigint'.
L2222: export interface BigIntStats extends StatsBase<bigint> {
[16:00:54] typescript: node_modules/@types/node/events.d.ts, line: 55
Cannot find name 'symbol'.
L55: static readonly errorMonitor: unique symbol;
The errors are completely gone and app builds perfectly if I uninstall stripe. What can I do to solve this problem? I have to complete this app soon and do not have time to update everything to the latest versions.
Thank you
2 posts - 2 participants