Response error code: 500 after installing node modul


#1

Hi everybody,

im facing an error that i’m unable to resolve. I’m also quit a newbie with expo, but i read many threads and tried many workarounds, nothing helped.

So my problem is: I want to install a npm modul (react-csv) which i did with

npm install react-csv --save

(i also tried to install it globally). The modul appears in my node_moduls directory in my expo project directory. Now im trying to import that module with

import { CSVLink, CSVDownload } from 'react-csv';

And here is where the drama begins. I’m getting thefollowing error message on my phone:

As soon as i delete the import line in my code, the error disappears. I also tried to renew the link for the moduls with:

react-native link

Other moduls i did import are working fine:

import { Constants, Accelerometer, Audio } from 'expo';
import { StyleSheet, Text, View, Image, Button } from 'react-native';
import { Ionicons } from '@expo/vector-icons';

I really hope somebody can help me, because its frustrating. I would be reallythankful. Yet i didn’t find any solutions that fits, so i guess this would be helpful for other people as well.


#2

It seems to me that you are using React components in the React Native which is why it returns response error code 500.


#3

It looks like this error message is related to HTML attributes being unavailable in RN. I’d recommend trying a CSV library that’s compatible with RN, you can check native.directory for a curated list of supported libraries.

Also, note that react-native link doesn’t do anything be default in a normal/un-detached Expo project.