error attachToServer is not a function.
See original GitHub issueEnvironment
System: OS: macOS 12.1 CPU: (8) x64 Intel® Core™ i7-7700K CPU @ 4.20GHz Memory: 68.83 MB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.12.0 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 8.1.0 - /usr/local/bin/npm Watchman: 2022.01.03.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 28, 29, 30, 31, 32 Build Tools: 28.0.3, 29.0.2, 30.0.2, 31.0.0, 32.0.0 System Images: android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8139111 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: 15.0.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.2 => 0.67.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Description
Hello there, today I’m trying a new app, and I got this error. Any idea?
Thanks!
error attachToServer is not a function.
TypeError: attachToServer is not a function
at Object.runServer [as func] (/Users/*******/Documents/Devs/*******/AppName/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 (/Users/*******/Documents/Devs/*******/AppName/node_modules/@react-native-community/cli/build/index.js:192:9)
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top GitHub Comments
The fix should be ready on npm: https://www.npmjs.com/package/@react-native-community/cli-server-api Please update the
@react-native-community/cli
to the 6.x version by invalidating the lock file.Published a breaking change to 6.x by mistake. Working on a fix right now.