Giter Club home page Giter Club logo

Comments (10)

guvenkaranfil avatar guvenkaranfil commented on September 21, 2024 3

As a workaround you can use mock the could not found module @sebas21 @maluramichael

jest.mock('react-native-share', () => {
  return {
    NativeRNShare: () => {},
  };
});

from react-native-share.

maluramichael avatar maluramichael commented on September 21, 2024 1

As a workaround you can use mock the could not found module @sebas21 @maluramichael

jest.mock('react-native-share', () => {
  return {
    NativeRNShare: () => {},
  };
});

Thanks a lot. This helped me so much.

from react-native-share.

dieguezz avatar dieguezz commented on September 21, 2024 1

Happens to me when running the app (not only tests) since 9.0.0. 8.2.2 is the latest release i can use in my project.

from react-native-share.

maluramichael avatar maluramichael commented on September 21, 2024

I think this is the same problem we got in our tests. They fail right now and i don't know how to work around it.

  • "react-native-share": "^9.2.3"
  • "react-native": "0.71.12"
● Test suite failed to run
    Cannot find module '../codegenSpec/NativeRNShare' from 'node_modules/react-native-share/lib/commonjs/index.js'
    Require stack:
      node_modules/react-native-share/lib/commonjs/index.js
      app/helper/Image.js
      app/components/stateless/atomic/CachedImage/index.js
      app/components/stateless/atomic/ProfileImage/index.js
      app/components/stateless/atomic/ProfileImage/test.js
      13 | import { Image }     from 'react-native';
      14 | import imageCacheHoc from 'react-native-image-cache-hoc';
    > 15 | import Share         from 'react-native-share';
         | ^
      16 |
      17 | import Api               from '@constants/Api';
      18 | import { THUMBNAIL_API } from '@constants/Api';
      at Resolver._throwModNotFoundError (node_modules/jest-resolve/build/resolver.js:491:11)
      at Object.require (node_modules/react-native-share/lib/commonjs/index.tsx:1:1)
      at Object.require (app/helper/Image.js:15:1)
      at Object.require (app/components/stateless/atomic/CachedImage/index.js:25:1)
      at Object.require (app/components/stateless/atomic/ProfileImage/index.js:19:1)
      at Object.require (app/components/stateless/atomic/ProfileImage/test.js:12:1)
      at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
      at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:9)

from react-native-share.

sebas21 avatar sebas21 commented on September 21, 2024

@maluramichael Friend, could you solve it?

from react-native-share.

maluramichael avatar maluramichael commented on September 21, 2024

@maluramichael Friend, could you solve it?

sadly no.

from react-native-share.

Naishadh8115 avatar Naishadh8115 commented on September 21, 2024

Quick workaround with react-native-share: 10.0.2 and react-native: 0.73.1
Wrong path is being imported,
Open node_modules/react-native-share/lib/commonjs/index.js file,
find ../codegenSpec/NativeRNShare and replace it with ../../codegenSpec/NativeRNShare

from react-native-share.

effektsvk avatar effektsvk commented on September 21, 2024

I also needed to patch helpers/android.js (from ../../ to ../../../), there was import of NativeRNShare as well. I'm on React Native 0.73.2 and react-native-share: 10.0.2

from react-native-share.

github-actions avatar github-actions commented on September 21, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a "discussion" and i will leave this open

from react-native-share.

MateusAndrade avatar MateusAndrade commented on September 21, 2024

🎉 This issue has been resolved in version 10.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

from react-native-share.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.