Comments (14)
@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.
@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.
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.
I removed debowerify.
And index.js only contains exactly the example in the readme.
Same error
from react-treebeard.
I forgot to mention:
npm version: 2.14.7
node version: 4.2.2
from react-treebeard.
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.
@Bramas. Would it be possible for you to repo this project into github so I can try to fix it?
from react-treebeard.
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.
@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.
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.
@bkniffler I'm struggling to replicate this here. Do you have a small test project that errors that I can see?
from react-treebeard.
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.
@bkniffler Ah ok cool. :-)
from react-treebeard.
Upgrading NPM to 3.10.8 via npm install -g npm
resolved the issue for me.
from react-treebeard.
Related Issues (20)
- Example doesn't work HOT 2
- Is it possible to change the Icon? HOT 1
- [Question] Is it possible to expand node without selecting it? HOT 15
- How to get name for parent node?
- Example code does not work as expected. Parent and child nodes all get highlighted when expanded
- How to handle right click events over folders and nodes (files)? HOT 4
- style object is mutated by a component it's passed to HOT 1
- its impossible to update treebeard from client side dynamically?
- How to Pass nodes in custom toggle decorater
- Performance for large numbers of files
- Update data when new file is added HOT 1
- Using array for multiple root nodes fails when interacting with tree (example included) HOT 3
- responsive
- Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. Check the render method of `VelocityTransitionGroup`. HOT 2
- Show buttons to the right when hovering on a node? HOT 1
- [Request] Do not show polygon if no children are provided.
- Dynamically add children through API
- [Question] Display more than the name HOT 1
- [Bug] Arrows in markdown are way off on the right HOT 1
- [Question] Remove onToggle from file nodes? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-treebeard.