GithubHelp home page GithubHelp logo

Comments (6)

RealOrangeOne avatar RealOrangeOne commented on July 18, 2024

This is normal, and intended. Only versions distributed through npm have the built source. Rather than that babel command, which doesnt look that great, you can do:

cd node_modules/react-native-mock && npm run build && cd -

to reuse the internal build script.

from react-native-mock.

lalop avatar lalop commented on July 18, 2024

Reading the code I tried to call the react-native-mock like that require('react-native-mock/src/react-native-mock'); which seems to work the built version is only for non es6 support ?

from react-native-mock.

RealOrangeOne avatar RealOrangeOne commented on July 18, 2024

There are almost certainly other things the build does rather than just convert to ES5 (I forget off the top of my head). So whilst this isnt advised, it does work, yes. It's likely in future versions this will become less supported.

The highly recommended solution is to either run the version from npm, or run the build script.

(Saying that, testing for the rewrite branch is incredibly useful, so if you find any issues with it, be sure to let us know!)

from react-native-mock.

dannycochran avatar dannycochran commented on July 18, 2024

@RealOrangeOne where can the rewrite version be found on npm? The version currently available on npm is pretty old.

from react-native-mock.

RealOrangeOne avatar RealOrangeOne commented on July 18, 2024

@dannycochran Currently, it can't. The rewrite branch is still Work in Progress. Hopefully there will be a beta to test soon

from react-native-mock.

gabrielrotbart avatar gabrielrotbart commented on July 18, 2024

The highly recommended solution is to either run the version from npm

I had to fork and update the dependencies to deal with #139 so can't run via npm (see @danReynolds solution). I think that's going to be happening to most people who are upgrading > 16

from react-native-mock.

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.