-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Node >16, RN <0.68) Metro has encountered an error: Cannot read properties of undefined (reading 'transformFie'): . . . #790
Comments
This comment has been minimized.
This comment has been minimized.
Could someone who's experiencing this please post:
This does look like we're trying to use |
npm list -a is huge, with only one possible warning in it:
No other error. |
Thanks @nabtron
I'm actually more interested in the package versions you have - my working theory is that this might be a transform bug in a recent minor dependency update, causing promise branches to execute out of order. That's partly because a cluster of recent reports against an old Metro version suggests the issue is in a recently released dependency rather than Metro itself. You could post the output to a gist if you like, or filter down to Are you still regularly seeing this issue? |
package-lock.json: https://gist.github.com/nabtron/3ab61e930e3ad997deaa54e294c3e154 |
This work for me
and i'm not downgrade my node my node i'm just install same node from |
@kidtzz so issue is with metro or openssl? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi!
|
Yes, this is down to incompatibility of older versions of Metro with Node 17+. Contrary to the original issue report here, I haven't seen a reproduction for Node <17. The root cause is Node 17 using OpenSSL 3 (nodejs/node#40455), which drops support for MD4 hashing, which we used until #752. Three options:
|
It works for me too! thanks |
I solved this by switching to node v16. |
facebook/react-native#35210 a. delete node_modules directory b. yarn install c. cd android; gradlew.bat clean 2. add Environment Variable facebook/metro#790 NODE_OPTIONS=--openssl-legacy-provider d. npx react-native run-android
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There are multiple possible root causes to this message, which indicates the transformer failed to load. The cause at the time this issue was opened has been fixed for more than a year, and anyone still seeing this is likely experiencing a different bug for which we'll need details on how to reproduce. There's no way we can help with "+1" type responses. Please do open a new issue, and we can give this a fresh look. @Martyneris - that's a different message and definitely not the same issue. Feel free to open a new one with a reproduction. I'm locking this because the original root cause here is fixed, but please don't be discouraged from opening a new issue. |
Error while running react-native app on ios.
react-native version: 0.67.3
Metro has encountered an error: Cannot read properties of undefined (reading 'transformFie'): . . .
Tried changing node version to 17, 16.12, 14, etc. but no use.
Please help / guide. Thanks.
detailed error:
The text was updated successfully, but these errors were encountered: