After editing and saving worklets are not recognized on Ui thread #5163
Unanswered
iam-aditya
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a react native functional component with a worklets defined, whenever I make some changes and save, I get this error-
Error: ENOENT: no such file or directory, open '/AwesomeProject/worklet_13358486790341'
at readFileSyncUtf8 (node:internal/fs/read/utf8:20:3)
at Object.readFileSync (node:fs:467:12)
at getCodeFrame (/AwesomeProject/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/Server.js:879:18)
at Server._symbolicate (//AwesomeProject/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/Server.js:962:22)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Server._processRequest (/Users/adityagupta/AwesomeProject/node_modules/@react-native-community/cli-plugin-metro/node_modules/metro/src/Server.js:418:7) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/AwesomeProject/worklet_13358486790341'
}
ERROR ReanimatedError: Tried to synchronously call a non-worklet function on the UI thread.
Possible solutions are:
a) If you want to synchronously execute this method, mark it as a worklet
b) If you want to execute this function on the JS thread, wrap it using
runOnJS
, js engine: reanimatedWhen I press r to reload, then it works fine. But editing and saving does not work because of worklets.
Kindly help.
Beta Was this translation helpful? Give feedback.
All reactions