I'm trying to use the react-dropdown-input library in my react project.
(https://www.npmjs.com/package/react-dropdown-input)
I used npm i react-dropdown-input and it installed.
But when I run my project, I get this errors:
ERROR in ./~/react-dropdown-input/index.js Module not found: Error: Can't resolve 'react/addons' in 'path\node_modules\react-dropdown-input'
And this one too
ERROR in ./~/react-dropdown-input/index.js
Module not found: Error: Can't resolve 'react/lib/joinClasses' in 'path\node_modules\react-dropdown-input'
I also tried to run this command: npm install #types/react-dropdown-input but that library doesn't exists.
This is my import line:
import DropdownInput from "react-dropdown-input";
In my code it also says this:
Could not find a declaration file for module 'react-dropdown-input'.
Does anyone knows why this is happening and how to solve this?
Tested on npm#6.4.1, node#10.13.0. It fails.
I tried cloning it. Looks like library in not maintained. Its last commit was around 5 years back.
You can have a look at React Autosuggest. Its provides exact features you are looking for.
Hope this helps.
Related
Let me start off by saying i'm really new to this, so this might be obvious to some of you...
I am trying to build my NextJS project but it fails to compile. The errors i'm getting are the following:
./node_modules/openid-client/lib/helpers/deep_clone.js
Module not found: Can't resolve 'v8' in ....
and
./node_modules/openid-client/lib/helpers/keystore.js
Module not found: Can't resolve 'v8' in...
Both input traces end on the /server/auth.ts file which leads me to suspect that I have messed up the next auth implementation somewhere, but the issue is that i have not added anything beside the boilerplate provided by the t3 stack (besides the env variables and providers).
Thank you very much for your time!
This is the first time i tried to build the project. Everything works fine in dev mode
I have the following error:
plugin:vite:import-analysis] Failed to resolve import "part:#sanity/base/schema-creator" from "schemas/schema.js". Does the file exist?
It looks like sanity/base dependency is non existent but every time I go to install it the version is not compatible with React 18.2. Is React 18.2 really not compatible or is there something else probably wrong?
Also it may be worth noting that I got the above error after solving this error: "Failed to resolve import "./schemas" from "sanity.config.js"." What I did was change my import in the sanity.config.js to import {schemaTypes} from './schemas/schema'.
I tried npm ls #sanity/base to see if it was there. I also tried npm install #sanity/base and it looked like the versions between React 18.2 and Sanity were incompatible.
I would rather not go to later version of React and ReactDom so I was seeing if there was possibly something else going on.
It turns out I was using version 2 code for version 3 sanity. I migrated everything to the version 3 format. here is the link to the migration setup:https://www.sanity.io/docs/migrating-from-v2.
I'm working on my project and all of a sudden, I got the following message from the compiler and don't know how to solve the problem:
ERROR in ./src/frontend/service/AuthService.ts 8:0-39
Module not found: Error: Package path ./compat is not exported from package /Users/chuben/Desktop/Coding_Projects/ecommerce-react-node/final.frontend.project/node_modules/firebase (see exports field in /Users/chuben/Desktop/Coding_Projects/ecommerce-react-node/final.frontend.project/node_modules/firebase/package.json)
ERROR in ./src/frontend/ui/page/RegisterPage/index.tsx 14:0-39
Module not found: Error: Package path ./compat is not exported from package /Users/chuben/Desktop/Coding_Projects/ecommerce-react-node/final.frontend.project/node_modules/firebase (see exports field in /Users/chuben/Desktop/Coding_Projects/ecommerce-react-node/final.frontend.project/node_modules/firebase/package.json)
I don't understand what the problem is and how should I export the path correctly? I will really appreciate anyone who can help solve this problem. Thanks in advance!
Hopefully, I don't have to do everything from scratch by starting a new project.
I found the issue there. I shouldn't set the following in my React page, or else the system will try to search the module for the variable or sth.
const [firebaseUid,setFirebaseUid]=useState<String|undefined>(undefined);
In a React project, I am trying to run the app on a live server in the web browser. However when I command CD Ravenous to go to the right file and npm start, the browser gives me the following error:
./src/index.js
Module not found: Can't resolve './App' in '/Users/mauricemarkslag/ravenous/src'
I've checked if the imports have been filled in correctly, and that should be the case now I guess. However the error doesn't seem to be fixed with this code:
Code file
Folder structure
Does anybody know what I might do wrong?
You have a typo, you should use ./app.css instead of ./App.css, and I am assuming that the file that you put in your question is app.js.
I'm working in a React app with create-react-app and suddenly after installing react-charts-2 I started to get this error:
./node_modules/#jest/console/build/BufferedConsole.js
Module not found: Can't resolve 'console' in '/my-app/node_modules/#jest/console/build'
I already tried to remove the react-charts-2 but the error still appears.
Any thoughts?
Node 6.9.0
I had this error due to auto import of a function from an incorrect library:
import each from 'jest-each' -- should be 'lodash' here
Removing this line fixed the issue.