#redquicksilver

1 messages · Page 1 of 1 (latest)

wheat sandBOT
harsh otter
fallow veldt
#

Ok, thank you - that is the sample project I have been using as a reference

#

I have copied the js file into a file in our solution, and have done an npm install of the stripe/strips-js library

#

I was getting compilation errors when someone told me to add 'import Stripe from stripe' at the top of the js file

#

which I have done. Now I have no errors, but when I run it, it no longer works

#

I get these 2 errors:

#

My code looks like this which I have pretty much copied from your website:

harsh otter
# fallow veldt

Not seeing exports in your screenshot, is this how looks your stripe-payment.js ?

fallow veldt
#

Yes, that is correct - it is my stripe-payment.js file, and there isn't an exports

harsh otter
#

When you click on the lick, it refers to what line in your script ?

fallow veldt
#

When I click on the first error it goes to the generated javascript file, (from the Typescript one) highlighting this line:

#

and the 2nd error takes me to this line:

harsh otter
# fallow veldt

Here it doesn't look like your initial js file, are you using a framework ?

fallow veldt
#

We are not using a framework, but it is Typescript

#

The first screenshot is of stripe-payment.JS which has been created by Typescript

#

The 2nd screenshot is of stripe-payment.TS which is the Typescript file

harsh otter
#

How are you doing the conversion from the Typescript to Javascript ? what compiler are you using?

fallow veldt
#

We use Visual Studio 2022

harsh otter
#

It looks like there is an issue while doing the translating, Like line 2 in the JS result file

fallow veldt
#

Thank you os4m37 - I will go through that page and let you know how it goes