GithubHelp home page GithubHelp logo

Unable to Run the project about react-reveal HOT 4 CLOSED

rnosov avatar rnosov commented on July 16, 2024
Unable to Run the project

from react-reveal.

Comments (4)

rnosov avatar rnosov commented on July 16, 2024

Are you installing react-reveal via NPM? You should install it like so:

npm install react-reveal --save

and if you need Fade import it like this (from the docs)

import Fade from 'react-reveal/Fade';

It looks like what you're trying to do is to import it from source files which wouldn't work as you need the transpiled output.

from react-reveal.

darshana96 avatar darshana96 commented on July 16, 2024

Yes I am doing the same way. I shall try once again and update you.

from react-reveal.

rnosov avatar rnosov commented on July 16, 2024

Hmmm, if it's installed via npm then react-reveal errors should generally come from node_modules folder. I see that's not the case in here. Perhaps, you have some problem with your Babel configuration (say add-module-exports is missing) ?

from react-reveal.

darshana96 avatar darshana96 commented on July 16, 2024

Following thing where added for these changes :

  1. .bablerc
    {
    "presets": [
    "react",
    "es2015",
    "stage-2"
    ],
    "plugins": [
    "add-module-exports",
    "transform-runtime"
    ]
    }

  2. webpack.config.js
    loaders:[
    {
    test: /.js$/,
    loader: 'babel-loader',
    exclude: /node_modules/,
    },
    ]

  3. npm install babel-plugin-transform-runtime babel-preset-es2015 babel-preset-stage-2 --save

  4. npm i babel-plugin-add-module-exports babel-preset-es2015 babel-preset-stage-2 --save

Worked for me.
Cheers

from react-reveal.

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.