Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native - error attachToServer is not a function

After command: npx react-native start

TypeError: attachToServer is not a function
    at Object.runServer [as func] (E:\WiemIleJem\WiemCoJem\node_modules\@react-native-community\cli-plugin-metro\build\commands\start\runServer.js:131:7)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Command.handleAction (E:\WiemIleJem\WiemCoJem\node_modules\@react-native-community\cli\build\index.js:192:9) ```

It's clean project created by command: npx react-native init
like image 242
AKK Avatar asked Oct 24 '25 16:10

AKK


1 Answers

I was able to resolve the issue by installing @react-native-community/cli

npm i @react-native-community/cli --save-dev

like image 190
Aayush Gour Avatar answered Oct 26 '25 06:10

Aayush Gour