Closed jtoar closed 1 year ago
I think I see why you used the generate command—to get the route listed in the Routes.tsx file. In that case maybe we do keep the yarn rw g page stripeDemo
line, but it needs to handle TS projects
@tjoar, I think maybe we can hack it by finding out whether the app is TS and then change file extension accordingly so that at least there are no duplicates idk
Got the same issue now while testing the plugin and was able to solve it by erasing the generated StripeDemoPage.tsx
file, thanks.
It might help to have the error "Module parse failed: Identifier 'StripeDemoPage' has already been declared" here in text so others can find this issue if they search for those words.
Fixed the double generation here: https://github.com/chrisvdm/redwoodjs-stripe/pull/113. For now it just skips generating a new stripeDemoPage
@chrisvdm I'm not sure if we need to generate the StripeDemo page anymore? When I first ran
npx @redwoodjs-stripe/cli@latest setup
, I got this error onyarn rw dev
:I discovered that there's two pages in
web/src/pages/StripeDemoPage
. It seems like one is coming fromyarn rw g page StripeDemo
and the other is coming from copying the templates:This error may only appear in TS projects where the generate command generates a
.tsx
file while copying the template copies over a.js
file.