ReactJS exporting to csv library issue - reactjs

How can i fix this issue?
[snowpack] Failed to load node_modules/react-csv/src/components/Link.js
Unexpected token (110:6) in /home/clarkeustaquio/Documents/adec/adec/client/node_modules/react-csv/src/components/Link.js
[snowpack] Dependency Install Error: Install failed.
Im using this library: https://www.npmjs.com/package/react-csv

It seems that is something that some folks have been experienced in https://github.com/react-csv/react-csv/issues/268
So you might try what they did to make it work.

Related

Module not found: Error: Can't resolve 'unfetch'

My first time using react and unfetch and im following a course. Couldnt find a solution on this particularly.
So i import unfetched with
import fetch from 'unfetch';
But when i run yarn start
i get
Module not found: Error: Can't resolve 'unfetch' in 'C:\Users\yigit\Desktop\demo\js\src'
when i hover over unfetch in my code it says module "c:/Users/yigit/Desktop/demo/js/node_modules/unfetch/src/index"
and the folder does exist and unfetch is in my package.json as
"unfetch": "^5.0.0",
Has anyone else encountered it and how can i solve it?
Btw: i did run npm fix audit didnt work.
https://github.com/developit/unfetch/pull/164
version 5.0.0 has an export bug
because of that I am using version 4.2.0

React Module not found

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

Stripe API: Module not found: Can't resolve '#stripe/react-stripe.js'

Do I have a simple typo? Do I need to install anything else? I'm getting the following error message:
"Module not found: Can't resolve '#stripe/react-stripe.js'"
I have also npm installed: #stripe/react-stripe-js #stripe/stripe-js
Appreciate any help figuring this out!
Below are screenshots for reference:
import ... from '#stripe/react-stripe-js'
You are importing it in the wrong way. #stripe/react-stripe.js is not correct. Just replace . with -, it should work then.
As you can see in the its document. You need to import its component from #stripe/react-stripe-js
stripe-js correct import statement
Stripe API ReactJS Error
“Module not found: Can’t resolve ‘#stripe/react-stripe.js’”
npm install #stripe/react-stripe-js#1.11.0
‘#stripe/react-stripe-js’ or ‘#react-stripe-js’
When I read the official Stripe docs, everything looked simple. However, I stuck at the first step for an hour.
The issue was a
Error: module not found: can’t resolve ‘#stripe/react-stripe-js’
It is a very simple error that occurs when we miss modules. But I definitely installed and followed the official manual like the below picture. It was very weird so I started to install another one but didn’t work.
So how do you fix it?
First, open your ” package.json” and take a look at
if your package is okay, it supposed to look like this below
#stripe/react-stripe-js”: “1.4.1”,
“#stripe/stripe-js”: “1.15.0”,
the Left side should be the package name and the right side is a version of the package. But when I opened up
“#stripe/stripe-js”:“github:stripe/stripe-js”
#stripe/react-stripe-js”:“github:stripe/stripe-js”
So I reinstalled it like this, added a specific version of the package instead of copying it from Strip docs.
Try like this (Answers)
npm install #stripe/react-stripe-js#1.1.2
npm install #stripe/react-stripe-js#1.11.0
And It solved easily. I am not sure why this issue happened. If I find the reasons, I will add them or if you know the reasons please let me know.

React Native Error - Unable to resolve "./withSafeArea" from "node_modules\react-native-safe-area-view\index.js"

I've just updated my React native version to 0.57 from 0.55.
I'm getting bunch of errors starting from Barbel, fixing errors one by one.
Now I'm encountering
"Unable to resolve "./withSafeArea" from
"node_modules\react-native-safe-area-view\index.js"
Error, and that's all information the console gives.
I tried googling it, seems like I'm the first one encountering this error.
What is the error here?
So far I've tried:
delete node_modules folder and do npm install again.
npm install react-native-safe-area-view.
Both no luck :(

Module not found: Can't resolve '#babel/runtime/core-js/array/from'

I am new to react and I have this problem when trying to use react-bootstrap.
I've installed react-bootstrap, reactstrap and react-bootstrap-select, and the problem is that when I try to import something from react-bootstrap I get this error:
./node_modules/react-bootstrap/es/DropdownMenu.js Module not found:
Can't resolve '#babel/runtime/core-js/array/from' in
'C:\webprojects\react\mytest-app\node_modules\react-bootstrap\es'
I removed the line calling this script and I got another similar error, but that mentions another script.
I have searched in many placed on the web and installed babel-runtime and I tried npm install but nothing seems to work. If I go to the mentioned folder I find these scripts. I don't really know what to do or what is the exact problem here.
Any help would be appreciated.
This looks like a recently introduced bug you are hitting, making the current 0.32.2 version of react-bootstrap incompatible with the babel version used:
https://github.com/react-bootstrap/react-bootstrap/issues/3231
We temporarily fixed the react-bootstrap version in package.json to 0.32.1 as a workaround.

Resources