Closed njokipal closed 2 years ago
Hi @njokipal!
Could you please try this out with v3.3.2
and let me know if you're still experiencing an issue?
Excellent, 3.3.2
actually works. I'm fairly certain I tried all the 3.3.x
versions available before reporting the issue, but it might be that my node_modules
or the React developer mode just didn't actually load the proper version.
Closing. Thanks @charlesdobson
Nope, you were correct! I made a quick fix and published it in 3.3.2. Thanks for reporting the issue!
@charlesdobson facing this issue on my local, using ngrok to debug the Shopify app locally. I tried the above versions but it's not working.
@shopify/app-bridge-react @ ^3.7.7 @shopify/polaris @ ^10.49.1 web-vitals @ ^2.1.4 react @ ^18.2.0
NodeJS @ v18.16.0 OS: Windows 11
Error on the console: App-Bridge failed to initialize web-vitals TypeError: web_vitals_1.onLCP is not a function
@mhaseebullah92 i am also facing the same issue, did you found any solution for it?
@rahul-adnabu now I am using @shopify/app-bridge-react @ 3.1.0 because this version is not dependent on web-vitals. but still facing the same issue on the latest version. This issue is closed now I am creating a new issue for it.
@mhaseebullah92 isn't web vitals necessary for shopiify to track lcp, cls?
I opened a new bug https://github.com/Shopify/shopify-app-bridge/issues/206 for this issue.
Also having this issue. The app was working yesterday during development, but without changing anything, we are getting the same.
when i try to run my shopify app , i get this error in the console " TypeError: o.onLCP is not a function" , i try the google search but still not able to find the solution , plz help me if you can.
I'm having the same issue. Did anybody solve this issue?
Describe the bug
Using
3.3.x
versions of the@shopify/app-bridge
, callingcreateApp()
will throwTypeError: web_vitals_1.onLCP is not a function
killing the app bridge init as we have the call inside atry...catch
where catching an error will just display an error state.App is created using
create-react
with manually added Shopify depsTo Reproduce
Steps to reproduce the behaviour:
@shopify/app-bridge
at3.3.0
,$ npm run start
createApp()
insidetry...catch
Expected behaviour
If WebVitals isn't essential, no exceptions were thrown if the package cannot for some reason initialise it's internals. Just report a problem and continue.
Contextual information
Packages and versions
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge
@3.3.0
@shopify/polaris
@10.3.3
web-vitals
@3.0.2
WebVitals is additionally registered by our own app. It makes no difference, if it is included or not to the error case
Platform
uname -r
) 5.19.9-arch1-1Additional context
Node.js 16, React app created using create-react, manually added Shopify deps