expo / examples

Example projects that demonstrate how to use Expo APIs and integrate Expo with other popular tools
2.21k stars 862 forks source link

examples/with-drawer-navigation/ - Several warnings / errors - Application does not run #402

Open stevus opened 1 year ago

stevus commented 1 year ago

Describe the bug

The error messages

Uncaught Error: Module parse failed: Unexpected token (4:9)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| export * from "./reanimated1";
| export * from "./reanimated2";
> export * as default from "./Animated";
    at ./node_modules/react-native-reanimated/lib/index.web.js (utils.ts:24:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./node_modules/@react-navigation/drawer/lib/module/views/DrawerView.js (DrawerToggleButton.tsx:54:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./node_modules/@react-navigation/drawer/lib/module/navigators/createDrawerNavigator.js (index.tsx:23:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./node_modules/@react-navigation/drawer/lib/module/index.js (index.tsx:4:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./App.js (App.js:1:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at ./node_modules/expo/AppEntry.js (AppEntry.js:1:1)
    at __webpack_require__ (bootstrap:789:1)
    at fn (bootstrap:100:1)
    at 1 (log.js:59:1)
    at __webpack_require__ (bootstrap:789:1)
    at bootstrap:856:1
    at bootstrap:856:1
Uncaught ReferenceError: process is not defined
    at 4043 (<anonymous>:2:13168)
    at r (<anonymous>:2:306599)
    at 8048 (<anonymous>:2:9496)
    at r (<anonymous>:2:306599)
    at 8641 (<anonymous>:2:1379)
    at r (<anonymous>:2:306599)
    at <anonymous>:2:315627
    at <anonymous>:2:324225
    at <anonymous>:2:324229
    at e.onload (index.js:1:1)
index.js:1 ./node_modules/react-native-reanimated/lib/index.web.js 4:9
Module parse failed: Unexpected token (4:9)
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
| export * from "./reanimated1";
| export * from "./reanimated2";
> export * as default from "./Animated";
Could not get the stack frames of error: TypeError: Cannot read properties of null (reading 'length')
    at G (index.js:1:1)
    at index.js:1:1
    at Array.map (<anonymous>)
    at index.js:1:1
    at c (index.js:1:1)
    at Generator._invoke (index.js:1:1)
    at Generator.next (index.js:1:1)
    at D (index.js:1:1)
    at i (index.js:1:1)

displays in Chrome developer tools.

To Reproduce Steps to reproduce the behavior:

  1. Create a project w/ the source from https://github.com/expo/examples/tree/master/with-drawer-navigation
  2. npm install
  3. npm run start
  4. Observe nothing renders in Chrome browser
  5. Observe error message in Chrome developer tools

Expected behavior Application displays, no warnings in Chrome developer tools.

Screenshots

image

Desktop (please complete the following information):

stevus commented 1 year ago

The application seems to crash when only importing the react navigation drawer factory method:

import { createDrawerNavigator } from "@react-navigation/drawer";

export default function App() {
  return (
    <div>
      TEST
    </div>
  );
}