my project is contains two dependency that need different version of React dependency,
when i set the react version ^15.0.0, the first dependency (input-moment) showing warning message at the browser console like the message below
Warning: Unknown props i, w on tag. Remove these props from the element.
but when i set the react version ^0.14.0, the second dependency (recharts) showing this warning message on the console
Warning: You are manually calling a React.PropTypes validation function for the allowDecimals prop on XAxis. This is deprecated and will not work in production with the next major version. You may be seeing this warning due to a third-party PropTypes library.
please help, how to solve this?
-> npm input-moment
-> npm recharts
Interestingly, both list peer dependencies of React 14 or 15.
https://github.com/recharts/recharts/blob/master/package.json
https://github.com/wangzuo/input-moment/blob/master/package.json
So both libraries contain bugs and an issue should be raised with them on github. If a package lists v15 as a peer, and doesn't work with said version I consider that a bug.
Just did a search on their issue tracker:
https://github.com/wangzuo/input-moment/issues/36
Related
I'm customizing ckeditor5, It can build successfully but when implemented it has an error saying "CKEditorError: ckeditor-duplicated-modules". I'm not sure what module duplicated.
In my code imported
Try to install the same version plugins (it work for me) likes:
check ckeditor5-core version fisrt
#ckeditor/ckeditor5-core": "^33.0.0"
I want to add "table" tool, use
npm i #ckeditor/ckeditor5-table#33.0.0"
to get specified version, instead of
npm i #ckeditor/ckeditor5-table
you may get a newer version, which need the second ckeditor5-core package lead to duplicated-modules (now you know which module duplicated)
I am working on a full-stack app. My front-end, built on React was working fine. I installed cors for my back-end and it suddenly started giving me Invalid hook call error in my react app.
I tried uninstalling the dependency and also reverting to 2 old commits but it didn't work. I'm thinking it might be because of a peer dependency causing multiple versions of React. I tried npm ls react and npm ls react-dom but I have only one version for each i.e. 17.0.2.
The error message is also not helpful as I cannot understand where to start digging from. Attaching it below.
Here's the code repo (I couldn't figure out which part of code to share). The React code is inside the client directory. If someone can pinpoint me where to look or help me with the issue I'll be obliged. Thanks!
Error message
Rather than having a single bundle for my rollup react app in development, I split it into two bundles. One for the dependencies and one for the app itself.
This way the watch mode stays fast (as it now doesn't has to parse the dependencies continously) and I don't have to write (or use third party) es module wrappers for libraries such as React.
While the code is bundled without any errors, I run into TypeError: React is undefined while running it. When I check the network panel in developer tools I do see the dependency bundles getting downloaded.
Here is how I am using rollup with its API.
You can see the rest of the relevant code here.
Can anyone point out what am I doing wrong? Any help appreciated!
This is a bug in the latest #rollup/plugin-commonjs version (14.0.0). It was fixed with the merge of this PR, but this hasn't been released to NPM yet. I went and built the latest version from GitHub, and used it with the repo in question, and React is now working.
So for now the solution is to use the latest source on GH until the next version is published.
I tried to run a new React Native (Android) project I got from somebody. When I run yarn install, the following error happens. How can I fix this ? I am new to react native.
patch-package: Applying patches...
**ERROR** Failed to apply patch for package react-native-confirmation-code-input
This error was caused because Git cannot apply the following patch file:
patches/react-native-confirmation-code-input+1.0.4.patch
This is usually caused by inconsistent whitespace in the patch file.
For anyone having this problem, this isn't a React-Native problem per se, it's because the library patch-package is trying to apply a patch for "react-native-confirmation-code-input" and fails.
This is mostly caused when the patch is created in Linux/MacOS and then used in Windows, because of EoL differences.
I started my React Native project with version 0.12.0 and Baobab. Everything worked great until React Native 0.14.2. In any version since then, the transform in the packager stops at 98% and the JS load fails.
I have used some of the advice in this github issue to determine that it's transforming a file in Baobab (baobab/dist/update.js or baobab/dist/watcher.js in different runs).
I have confirmed that Baobab is the issue by creating a clean React Native 0.16.0 install and only putting Baobab in it (with the required require)
At this stage, I'm not sure whether I should raise an issue with React Native or with Baobab, so I'm looking for advice on how to get some sort of error message that I can use to debug the issue and work out what's going wrong.
Ok. Worked this out myself:
By adding debug=babel to the environment the packager is running in, I got a huge amount of output and hidden in there was an error that .babelrc in the baobab package had an optional entry and the React Native packager doesn't understand optional. I deleted the .babelrc from the baobab package and everything works.