Giter Site home page Giter Site logo

Comments (14)

alexcurtis avatar alexcurtis commented on July 20, 2024

@Bramas Hi. It might be that you have 2 react libs in your dependency tree. I've made react a dev dependency, to avoid this issue though. Could you check your project and make sure you don't have more that one version of react installed please

from react-treebeard.

alexcurtis avatar alexcurtis commented on July 20, 2024

@Bramas It might be work running npm dedupe first to see if that solves the issue: https://docs.npmjs.com/cli/dedupe

from react-treebeard.

Bramas avatar Bramas commented on July 20, 2024

Thanks for your help.

First I removed reactify (which is deprecated) to use babel. Here is my package.json:

{
    //... name and desc
  "scripts": {
    "start": "browserify -t [ babelify --presets [ es2015 react ] ] -t debowerify ./index.js > ./bundle.js"
  },
  "devDependencies": {
    "babel-preset-es2015": "^6.1.18",
    "babel-preset-react": "^6.1.18",
    "babelify": "^7.2.0",
    "react-addons-test-utils": "^0.14.3",
    "react": "^0.14.3",
    "react-dom": "^0.14.3",
    "browserify": "*",
    "debowerify": "*",
    "react-treebeard": "*"
  }
}

But I still get the error.

@alexcurtis I tried to run dedupe but it returns nothing.

I will try to reduce even more my project (which is quite already small) to isolate the problem (because here debowerify can be the reason maybe)

from react-treebeard.

Bramas avatar Bramas commented on July 20, 2024

I removed debowerify.
And index.js only contains exactly the example in the readme.

Same error

from react-treebeard.

Bramas avatar Bramas commented on July 20, 2024

I forgot to mention:
npm version: 2.14.7
node version: 4.2.2

from react-treebeard.

alexcurtis avatar alexcurtis commented on July 20, 2024

After a quick Google. It might be a well known issue with browserify. The suggested fix is to use the browserify-resolutions plugin to dedupe react at the browserify level. Could you give that a quick go to see if it removes the errors. If not, I'll dig a little deeper into my project package and see if its my end. https://www.npmjs.com/package/browserify-resolutions

from react-treebeard.

alexcurtis avatar alexcurtis commented on July 20, 2024

@Bramas. Would it be possible for you to repo this project into github so I can try to fix it?

from react-treebeard.

Bramas avatar Bramas commented on July 20, 2024

I removed react-treebeard and reinstalled it and it works!

I don't know exactly what caused the problem. I mean it surely comes from conflicting instance of react as you said but where do they come from, i don't know (but certainly not from treebeard!!)

Thanks again for your help and for the great project, now I can have fun with it!!

from react-treebeard.

alexcurtis avatar alexcurtis commented on July 20, 2024

@Bramas Awesome. I thought it would be something like that. Thanks for the support! If you have any ideas / fixes / improvements, please let me know and i'll try and make it happen. Or, if you wanted to contribute a pull request, that would also be pretty cool!

from react-treebeard.

bkniffler avatar bkniffler commented on July 20, 2024

I had similar issues, react-treebeard only showing the symptoms, not being the cause. Double and triple check for duplicate react instances.

from react-treebeard.

alexcurtis avatar alexcurtis commented on July 20, 2024

@bkniffler I'm struggling to replicate this here. Do you have a small test project that errors that I can see?

from react-treebeard.

bkniffler avatar bkniffler commented on July 20, 2024

Oh, sorry, I wasn't clear. I wanted to confirm the previous comments and suggest that everyone who sees this issue should double check for duplicate react instances within their own project!

from react-treebeard.

alexcurtis avatar alexcurtis commented on July 20, 2024

@bkniffler Ah ok cool. :-)

from react-treebeard.

dan3721 avatar dan3721 commented on July 20, 2024

Upgrading NPM to 3.10.8 via npm install -g npm resolved the issue for me.

from react-treebeard.

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.