bigcommerce / subscription-foundation

Foundation for building custom subscription applications w/ BigCommerce
MIT License
11 stars 42 forks source link

TypeError: Reflect.getMetadata is not a function #21

Closed kesarweb closed 1 year ago

kesarweb commented 1 year ago

The app worked for a few weeks, nothing has been changed, and I am now getting the below error when I go Account -> Manage Subscriptions

Server Error TypeError: Reflect.getMetadata is not a function

This error happened while generating the page. Any console logs will be displayed in the terminal window. Call Stack

file:///var/www/html/stripe_foundations/node_modules/class-transformer/cjs/decorators/type.decorator.js (13:39) eval webpack-internal:///(api)/./shared/payloads/product/ProductSubConfigPayload.ts (15:410) Array.reduce _applyDecoratedDescriptor webpack-internal:///(api)/./shared/payloads/product/ProductSubConfigPayload.ts (15:367) eval webpack-internal:///(api)/./shared/payloads/product/ProductSubConfigPayload.ts (43:20) Object.(api)/./shared/payloads/product/ProductSubConfigPayload.ts file:///var/www/html/stripe_foundations/.next/server/pages/api/stripe/create-customer-portal-session.js (512:1) __webpack_require__ file:///var/www/html/stripe_foundations/.next/server/webpack-api-runtime.js (33:42) eval webpack-internal:///(api)/./backend/services/bigcommerce/catalog/products.ts (6:106) Object.(api)/./backend/services/bigcommerce/catalog/products.ts file:///var/www/html/stripe_foundations/.next/server/pages/api/stripe/create-customer-portal-session.js (312:1) __webpack_require__ file:///var/www/html/stripe_foundations/.next/server/webpack-api-runtime.js (33:42)
huntario commented 1 year ago

Hunter, with BigCommerce here. Thanks for opening up this issue. Taking a look at this, I’m only able to replicate this by starting up the app with npm run dev, clicking the “manage subscriptions” link before Next js has finished compiling the client and server. Please let me know if this continues after the app has been given enough time to startup. The issue may cache, so you’ll want to run npm run dev, and give Next a chance to do its work before starting. If the error remains, please let me know the following from your terminal:

node -v

nvm ls

npm run dev and the output you see in your terminal while encountering the error.

Hopefully this helps. Please let me know if this continues to block your work.

huntario commented 1 year ago

Going to go ahead and close this, but please feel free to open a new issue if this is still a problem after following the guidance above.