nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.75k stars 2.37k forks source link

getting error when starting expo app #28932

Open kalingaCoder opened 1 week ago

kalingaCoder commented 1 week ago

Current Behavior

nx run adminApp:serve

Web Bundling failed 35ms C:\code\dhrona_2\apps\adminApp\index.js (1 module) error: TypeError: Cannot read properties of undefined (reading 'transformFile') at Bundler.transformFile (C:\code\dhrona_2\node_modules\metro\src\Bundler.js:43:30)
at processTicksAndRejections (node:internal/process/task_queues:95:5) at Object.transform (C:\code\dhrona_2\node_modules\metro\src\lib\transformHelpers.js:130:12) at transform (C:\code\dhrona_2\node_modules\metro\src\DeltaBundler\Graph.js:164:26)
at visit (C:\code\dhrona_2\node_modules\metro\src\DeltaBundler\buildSubgraph.js:82:29) at async Promise.all (index 0) at buildSubgraph (C:\code\dhrona_2\node_modules\metro\src\DeltaBundler\buildSubgraph.js:103:3) at Graph._buildDelta (C:\code\dhrona_2\node_modules\metro\src\DeltaBundler\Graph.js:157:22) at Graph.initialTraverseDependencies (C:\code\dhrona_2\node_modules\metro\src\DeltaBundler\Graph.js:140:19) at DeltaCalculator._getChangedDependencies (C:\code\dhrona_2\node_modules\metro\src\DeltaBundler\DeltaCalculator.js:151:25) Web Bundling failed 6ms C:\code\dhrona_2\apps\adminApp\index.js (1 module)

Getting 500 internal server error for the below network call in the browser: http://localhost:8081/index.bundle?platform=web&dev=true&hot=false&lazy=true&transform.engine=hermes&transform.routerRoot=src%2Fapp

Expected Behavior

The expo app should load properly without any errors on browser

GitHub Repo

No response

Steps to Reproduce

  1. In an existing nx.dev workspace, run nx add @nx/expo

  2. nx generate @nx/expo:application --name=adminApp --directory=./apps/adminApp --displayName=adminApp --e2eTestRunner=none --js=true --linter=none --projectNameAndRootFormat=as-provided --unitTestRunner=none --no-interactive --dry-run

  3. nx run adminApp:serve

Nx Report

NX   Report complete - copy this into the issue template

Node           : 21.6.1
OS             : win32-x64
Native Target  : x86_64-windows
yarn           : 1.22.22

nx (global)        : 19.4.1
nx                 : 19.5.6
@nx/js             : 19.5.6
@nx/jest           : 19.5.6
@nx/linter         : 19.5.6
@nx/eslint         : 19.5.6
@nx/workspace      : 19.5.6
@nx/devkit         : 19.5.6
@nx/eslint-plugin  : 19.5.6
@nx/expo           : 19.5.6
@nx/express        : 19.5.6
@nx/node           : 19.5.6
@nx/react          : 19.5.6
@nrwl/tao          : 19.5.6
@nx/web            : 19.5.6
@nx/webpack        : 19.5.6
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx/webpack/plugin
@nx/eslint/plugin
@nx/jest/plugin
@nx/expo/plugin

Failure Logs

Package Manager Version

No response

Operating System

Additional Information

No response