mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
7.3k stars 1.07k forks source link

🐛 V3: Unable to resolve "react-native-worklets/src" #1715

Closed sravis02 closed 11 months ago

sravis02 commented 1 year ago

What were you trying to do?

I installed react native vision camera 3 (rc5) and created a development build with expo (49.0.8) and expo dev client (2.4.7).

The development build got created successfully but when I am trying to start the app i always get this error.

I installed these two libaries, since I am not sure which is needed. (the error mentions react-native-worklets but on twitter I saw that "-core" should be appended?)

    "react-native-worklets": "^0.0.1-alpha",
    "react-native-worklets-core": "^0.2.0"

I also added it to my babel.config.js

module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      ['@babel/plugin-proposal-decorators', { legacy: true }],
      ['@babel/plugin-transform-flow-strip-types'],
      ['@babel/plugin-proposal-class-properties', { loose: true }],
      ['react-native-worklets-core/plugin'],
      'react-native-reanimated/plugin',
      require.resolve('expo-router/babel'),
    ],
  };
};

Reproduceable Code

/

What happened instead?

IMG_9788

Relevant log output

Unable to resolve "react-native-worklets/src" from "node_modules/react-native-vision-camera/src/FrameProcessorPlugins.ts"

Device

iPhone 11

VisionCamera Version

3.0.0-rc.5

Additional information

marouane-edghoughi commented 1 year ago

1- Go to the file from where this issue is coming: node_modules/react-native-vision-camera/src/FrameProcessorPlugins.ts 2- change the Worklets import from react-native-worklets/src to react-native-worklets-core/src (make sure you have rn worklets core installed). Or you can wait for the next update as the developer is currently working on this issue.

mrousavy commented 11 months ago

Closing as this is a stale issue - this might have been fixed with the full rewrite in VisionCamera V3 (🥳) - if not, please create a new issue.

If your issue has been fixed, consider sponsoring me on GitHub to say thanks 💖