I get this error in EventEmitter.js during the project build process. #48630
Labels
Debugger
Issues related to React Native DevTools or legacy JavaScript/Hermes debugging
Needs: Author Feedback
Needs: Repro
This issue could be improved with a clear list of steps to reproduce the issue.
Resolution: Duplicate
Description
ERROR SyntaxError: /Users/msuzen/SCMMobile/node_modules/react-native/Libraries/vendor/emitter/EventEmitter.js: Unexpected token, expected "]" (39:5)
37 |
38 | type Registry<TEventToArgsMap: {...}> = {
{
"name": "SCMMobile",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"lint": "eslint .",
"start": "react-native start",
"test": "jest"
},
"dependencies": {
"@react-native-async-storage/async-storage": "^1.23.1",
"@react-native-community/datetimepicker": "^8.2.0",
"@react-native-community/geolocation": "^3.2.1",
"@react-native-community/masked-view": "^0.1.11",
"@react-navigation/drawer": "^6.6.3",
"@react-navigation/native": "^6.1.7",
"@react-navigation/stack": "^6.3.17",
"axios": "^1.6.8",
"date-fns": "^3.6.0",
"lodash": "^4.17.21",
"lottie-react-native": "^6.7.2",
"react": "18.3.1",
"react-native": "^0.76.6",
"react-native-dropdown-picker": "^5.4.6",
"react-native-element-dropdown": "^2.12.0",
"react-native-elements": "^3.4.3",
"react-native-gesture-handler": "^2.16.2",
"react-native-get-location": "^4.0.1",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-modal-datetime-picker": "^16.0.0",
"react-native-safe-area-context": "^4.7.1",
"react-native-screens": "^3.22.1",
"react-native-sqlite-storage": "^6.0.1",
"react-native-storage": "^0.2.4",
"react-native-svg-transformer": "^1.5.0",
"react-native-uuid": "^2.0.2",
"react-native-vision-camera": "^4.0.3",
"react-native-webview": "^13.10.2",
"react-native-worklets-core": "^1.5.0"
},
"devDependencies": {
"@babel/core": "^7.26.0",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@babel/plugin-transform-class-properties": "^7.25.9",
"@babel/plugin-transform-private-methods": "^7.25.9",
"@babel/plugin-transform-private-property-in-object": "^7.25.9",
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.26.3",
"@babel/runtime": "^7.26.0",
"@react-native-community/cli": "^15.1.3",
"@react-native/babel-preset": "^0.76.6",
"@react-native/eslint-config": "^0.76.6",
"@react-native/metro-config": "^0.76.6",
"@tsconfig/react-native": "^3.0.5",
"@types/react": "^18.3.18",
"@types/react-native": "^0.72.8",
"@types/react-native-sqlite-storage": "^6.0.5",
"@types/react-native-vector-icons": "^6.4.18",
"@types/react-test-renderer": "^18.0.0",
"babel-jest": "^29.2.1",
"eslint": "^8.19.0",
"jest": "^29.2.1",
"metro-react-native-babel-preset": "^0.76.5",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0",
"prettier": "^2.4.1",
"react-native-paper": "^5.12.5",
"react-native-reanimated": "^3.16.6",
"react-test-renderer": "18.2.0",
"typescript": "^4.8.4"
},
"engines": {
"node": ">=16"
}
}
Steps to reproduce
npm install
npx react-native run-ios
React Native Version
0.76.6
Output of
npx react-native info
Screenshots and Videos
The text was updated successfully, but these errors were encountered: