Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

optional react-native-fs require #159

Open
triple7 opened this issue Oct 21, 2021 · 0 comments
Open

optional react-native-fs require #159

triple7 opened this issue Oct 21, 2021 · 0 comments

Comments

@triple7
Copy link

triple7 commented Oct 21, 2021

Hi, and thanks for writing this. I'm finishing up a uni project to parse student timetables for matching and found node-ical which does the job normally, but the project currently is in react-native. I tried replacing const ical = require{'fs'}; with require{'react-native-fs'}; after yarn add react-native-fs but I get the following error:
Unable to resolve module path from /Users/osiris/Dropbox/Uni/s22021/deco3800/UQ-Pool/clientside/node_modules/node-ical/ical.js: path could not be found within the project or in these directories: node_modules/node-ical/node_modules node_modules ../node_modules

The file ical.js is there but it's not finding it when I run expo start to try on a simulator.

I'm a bit new with js node module creation and wondered if there is a dependency that breaks somewhere for some reason or is there a way to do an if else on the require import, depending on the system/end user platform being used?

thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant