Im trying to use net core template for react, and for validation purposes I've added react-validation package but it throws an error while starting app:
ERROR in ./~/react-validation/lib/build/validation.js
Module not found: Error: Can't resolve 'classnames' in 'C:\Users\pk\Documents\visual studio 2017\Projects\BetHub\BetHub.UI\node_modules\react-validation\lib\build'
# ./~/react-validation/lib/build/validation.js 3:45-66
# ./ClientApp/boot.tsx
# multi react-hot-loader/patch event-source-polyfill webpack-hot-middleware/client?path=__webpack_hmr&dynamicPublicPath=true ./ClientApp/boot.tsx
It seems as if it was not installed, but I've checked in node_modules an the package is there, anything Im missing?
Thanks for help!
This is actually a problem you should be asking on the npm package's open issues on github. I did a small amount of digging, and it turns out a few other people had the same problem. Their fix: Install classnames
npm install classnames --save
Related
I already install material-ui core by using this command.
npm i #material-ui/core
But, after this when I run my reactjs code, it throws an error like this
Module not found: Can't resolve '#mui/icons-material/Adb'
Please help me, how can I resolve this error?
Thanks in advance
#material-ui/core is the core package for MUI v4, but #mui/icons-material is for MUI v5, your code is using MUI v5. So here is what you need to install:
npm install #mui/icons-material
I want to implement react-loading-overlay in react for full page loaders.
Tried doing following things:
So I tried to install react-overlay-loading but it still shows me the error as above.
What's getting wrong here ? Any ideas ?
You are missing a module which is called react-loading-overlay which you can get by installing the package by using the command:
npm i react-loading-overlay-ts
This should install the required package.
I have a next.js project and I keep getting:
error - ./node_modules/jspdf/dist/jspdf.es.min.js:458:25
Module not found: Can't resolve 'canvg'
I'm not sure why because I'm not including either jspdf or canvg.
Not sure what's causing it. Any help would be appreciated. I'm using material-ui if that matters.
It seems dependency error means that particular Module is missing when it's running.
Run npm ls or yarn list will print to stdout all the versions of packages that are installed, as well as their dependencies, in a tree-structure. Then search for that particulate packages are listed or not.
Run npm ls jspdf or yarn list jspdf then you can see its list of dependencies in tree-structure.
Please check your node version is updated or not ? If not then update first.
Quick & Dirty way: delete package.lock or yarn.lock file and delete .node_modules folders And Then run npm install or yarn to install again.
Look at console while you installing and make sure there are no error in the installing process. If you saw error you better look that massages also.
I am trying to construct a tube-map with the help of d3js and Angular. I am using Angular 8 and d3 version 3.4.13. On doing npm start I'm getting a series of errors. Any leads on figuring out why that may be happening would be of great help.
Here is a link to the repository:
https://github.com/reshnaz/Tubemap.git
I'm getting the below errors:
ERROR in ./node_modules/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Can't resolve 'child_process' in '/home/reshma/Documents/Angular/tubemap_project/tubemap-dashboard/node_modules/xmlhttprequest/lib'
ERROR in ./node_modules/jsdom/lib/jsdom/browser/index.js
Module not found: Error: Can't resolve 'cssstyle' in
'/home/reshma/Documents/Angular/tubemap_project/tubemap-dashboard/node_modules/jsdom/lib/jsdom/browser'
ERROR in ./node_modules/jsdom/lib/jsdom/level2/style.js
Module not found: Error: Can't resolve 'cssstyle' in
'/home/reshma/Documents/Angular/tubemap_project/tubemap-dashboard/node_modules/jsdom/lib/jsdom/level2'
ERROR in ./node_modules/jsdom/lib/jsdom.js
Module not found: Error: Can't resolve 'fs' in
'/home/reshma/Documents/Angular/tubemap_project/tubemap-dashboard/node_modules/jsdom/lib'
ERROR in ./node_modules/jsdom/lib/jsdom/level2/html.js
Module not found: Error: Can't resolve 'fs' in
'/home/reshma/Documents/Angular/tubemap_project/tubemap-dashboard/node_modules/jsdom/lib/jsdom/level2'
ERROR in ./node_modules/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Can't resolve 'fs' in
'/home/reshma/Documents/Angular/tubemap_project/tubemap-dashboard/node_modules/xmlhttprequest/lib'
ERROR in ./node_modules/jsdom/lib/jsdom.js
Module not found: Error: Can't resolve 'request' in
'/home/reshma/Documents/Angular/tubemap_project/tubemap-dashboard/node_modules/jsdom/lib'
I cannot believe the problem is caused by anything other than the old version of d3 you are using.
The errors you are seeing about missing modules are likely to be because you ran npm install and this generated a load of errors which you either failed to notice or deliberately ignored, and tried to proceed anyway as if nothing was wrong. Or maybe npm install ran fine but your node_modules folder contains a load of cruft left over from the React.js project? What happens if you delete your node_modules folder and try running npm install again?
How the original React.js app you mention worked I can't say, especially since you don't provide a link to the GitHub source code you mention. Perhaps it used an older version of React, which in turn required other older dependencies. Deciding to use the latest version of Angular is somewhat at odds with deciding to use such an old version of d3 in the same project.
The only suggestion I have (if it isn't already obvious) is to bite the bullet and upgrade your project to the latest version of d3. Yes, you will have to change the way your code calls to d3, as d3 has changed somewhat between version 3 and version 5. But that's just too bad.
Deleting node_modules and package-lock.json, followed by npm cache clean and npm install solved the problem.
Trying to build my first website with react, following along with this tutorial: https://www.youtube.com/watch?v=9AboneIxeM8&t=599s
I am trying to install and use the material lite module, however when I start npm I get a failure to compile with the following message :
Module not found: Can't resolve 'react' in '/Users/user/node_modules/react-mdl/lib'
Can someone help me understand what this means and how to fix it ? I'm at a loss it seems above my skill level.
Since you're following a tutorial there is probably some copy/ pasting involved. Hence, an already present package-lock.json file :)
I suggest doing the following:
Delete package-lock.json
Check if node_modules/react exists.
If it doesn't, check if React is in your package.json. If you don't have it listed, add it. After that:
Run npm install again
Check if node_modules/react exists.
[If it doesn't, something's messed up with your npm on your system. Try updating your NPM, or better yet, your Node environment. -npm comes with it].
npm install --save react-mdl then
restart react server