I get this error when trying to use the MantleProvider in my Shopify / Remix application:
ReferenceError: process is not defined
at LocalizedApp (https://garlic-heath-usda-cas.trycloudflare.com/app/routes/app.tsx:25:23)
at renderWithHooks (https://garlic-heath-usda-cas.trycloudflare.com/node_modules/.vite/deps/chunk-GZD7INZN.js?v=b548b456:11548:26)
at mountIndeterminateComponent (https://garlic-heath-usda-cas.trycloudflare.com/node_modules/.vite/deps/chunk-GZD7INZN.js?v=b548b456:14926:21)
at beginWork (https://garlic-heath-usda-cas.trycloudflare.com/node_modules/.vite/deps/chunk-GZD7INZN.js?v=b548b456:15914:22)
at beginWork$1 (https://garlic-heath-usda-cas.trycloudflare.com/node_modules/.vite/deps/chunk-GZD7INZN.js?v=b548b456:19753:22)
at performUnitOfWork (https://garlic-heath-usda-cas.trycloudflare.com/node_modules/.vite/deps/chunk-GZD7INZN.js?v=b548b456:19198:20)
at workLoopSync (https://garlic-heath-usda-cas.trycloudflare.com/node_modules/.vite/deps/chunk-GZD7INZN.js?v=b548b456:19137:13)
at renderRootSync (https://garlic-heath-usda-cas.trycloudflare.com/node_modules/.vite/deps/chunk-GZD7INZN.js?v=b548b456:19116:15)
at recoverFromConcurrentError (https://garlic-heath-usda-cas.trycloudflare.com/node_modules/.vite/deps/chunk-GZD7INZN.js?v=b548b456:18736:28)
at performConcurrentWorkOnRoot (https://garlic-heath-usda-cas.trycloudflare.com/node_modules/.vite/deps/chunk-GZD7INZN.js?v=b548b456:18684:30)
I was using process.env above in my component to retrieve Mantle credentials, which was the cause of the error. Surprisingly, this was not throwing an error when MantleProvider was commented out!
I get this error when trying to use the
MantleProvider
in my Shopify / Remix application:here is the return of my app component:
This error disappears when I comment the MantleProvider, and comes back when I uncomment. Please let me know your thoughts! Thank you!