Skip to content

Commit

Permalink
iOS build not functioning due to dotenv function
Browse files Browse the repository at this point in the history
line 9 in index.tsx is causing the following error when building on an iOS device:

**iOS Bundling failed
The package at "node_modules\dotenv\lib\main.js" attempted to import the Node standard library module "path".
It failed because the native React runtime does not include the Node standard library.
Learn more: https://docs.expo.dev/workflow/using-libraries/#using-third-party-libraries**

Removing this line fixes this error and allows me to view the pages, however I don't know if this will cause anything in the backend to fail. We need to check that this change won't cause any issues and, if so, proceed with removing the line.
  • Loading branch information
AnonymousKitty committed Jul 22, 2024
1 parent 055fefd commit 3d6b1b0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions frontend/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import SignupScreen from '@/screens/SignupScreen';
import HomeScreen from '@/screens/HomeScreen';
import * as dotenv from 'dotenv';

Check warning on line 7 in frontend/app/index.tsx

View workflow job for this annotation

GitHub Actions / lint

'dotenv' is defined but never used

dotenv.config();

type RootStackParamList = {
Login: undefined;
Signup: undefined;
Expand Down

0 comments on commit 3d6b1b0

Please sign in to comment.