I have installed an npm package on my react application but everytime I try to compile I get this error:
Module not found: Error: Can't resolve 'serialport' in 'C:\Users\Username\Desktop\ProjectGroup\c-test\src'
I have checked the node_modules folder and it is in fact in that folder.
i have also tried to install it again but it still throws the same error.
How would I go about fixing this?
As shown in comments, you installed only the types which are usefull for TypeScript.
Run npm i serialport
Related
I'm using yarn 3.2.0(latest) and node 17.6.0(latest)
As instructed in CRA documentation I ran yarn create react-app myapp. It completed installation and was able to start the app using yarn start. However after making changes to the App , I always get the following error
ERROR
Failed to load config "react-app" to extend from.
Referenced from: D:\myapp\package.json
If I install any packages, I get module not found error like below
ERROR in ./src/App.js 6:0-39
Module not found: Error: Can't resolve 'styled-components' in 'D:\myapp\src'
Anyone know what's going on?
I had a similar issue. And found that the reason why this was happening to me was due to my Antivirus. Try disabling your antivirus on windows if you have one and re-create your project and if that fixes your issue.
I have ran npm install #ant-design/react-native --save but I keep getting the error below:
error: Error: Unable to resolve module `#react-native-community/viewpager`
from `node_modules/#ant-design/react-native/lib/carousel/index.js`:
#react-native-community/viewpager could not be found within the project.
Why is happening? How do I fix this?
I have the component react-native-modal-datetime-picker in my React Native project. It's throwing the following error:
error: bundling failed: Error: Unable to resolve module '#react-native-community/datetimepicker' from 'node_modules/react-native-modal-datetime-picker/src/DateTimePickerModal.android.js: #react-native-community/datetimepicker could not be found within the project.
It seems that there's a reference in the react-native-modal-datetime-picker module to the #react-native-community/datetimepicker module. I've never run into a scenario before where I had to manually add a dependency of another dependency. Does anyone have any insight on why this is happening?
see the github
you need to run this:
expo install react-native-modal-datetime-picker #react-native-community/datetimepicker
I encountered this same problem and I found that the autolinking wasn't done so I had to run the command
npx react-native link #react-native-community/datetimepicker
‘ #react-native-community/datetimepicker’ is declared as a peer dependency to ‘ react-native-modal-datetime-picker’. Peer dependencies must be installed alongside the original package.
In dependencies, there should be node in case node is not there install npm i node
and try installing date picker again.
I am creating a React/redux app in VS Code and connecting with firebase. I have installed a package, it installed successfully but I am getting error when compiling, I tired to re install the packages and did not get any error but still getting compile error, can anybody help?
packages installed
npm install react-redux-firebase redux-firestore
Error I am getting
./node_modules/redux-firebase/lib/createFirebaseMiddleware.js
Module not found: Can't resolve 'debounce' in '[my file system location]\[my project name]\node_modules\redux-firebase\lib'
Update : I was installing the wrong package, I was installing "redux-firebase" but actual package was "redux-firestore". Now it is working.
I just installed Generator-ionic
in the folder where i genrated the app im trying to run grunt server
i get this error Error: Cannot find module 'win-spawn'
Not sure why the dependency is not being met, but it happened here too.
Solution:
npm install win-spawn
Edit:
Generator-ionic team is aware of the issue: https://github.com/diegonetto/generator-ionic/issues/162