react-native-use-websocket icon indicating copy to clipboard operation
react-native-use-websocket copied to clipboard

Types error in expo project

Open nicolae536 opened this issue 1 year ago • 0 comments

Hey I get some warnings in a expo project do you know what might be and how I could fix it 🤔 ? It seems the library works regardless of the warnings. This is the error:

 Metro waiting on exp://192.168.2.28:19000
› Scan the QR code above with Expo Go (Android) or the Camera app (iOS)

› Web is waiting on http://localhost:19006

› Press a │ open Android
› Press i │ open iOS simulator
› Press w │ open web

› Press j │ open debugger
› Press r │ reload app
› Press m │ toggle menu

› Press ? │ show all commands

Logs for your project will appear below. Press Ctrl+C to exit.
(node:94811) [DEP_WEBPACK_DEV_SERVER_CONSTRUCTOR] DeprecationWarning: Using 'compiler' as the first argument is deprecated. Please use 'options' as the first argument and 'compiler' as the second argument.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:94811) [DEP_WEBPACK_DEV_SERVER_LISTEN] DeprecationWarning: 'listen' is deprecated. Please use the async 'start' or 'startCallback' method.
WARNING in ./node_modules/react-native-use-websocket/lib/module/index.js:3
export 'SendMessage' (reexported as 'SendMessage') was not found in './lib/types' (module has no exports)
  1 | export { useWebSocket as default } from './lib/use-websocket';
  2 |
> 3 | export { SendMessage, Options } from './lib/types';
  4 |
  5 | export { useSocketIO } from './lib/use-socket-io';
  6 |

WARNING in ./node_modules/react-native-use-websocket/lib/module/index.js:3
export 'Options' (reexported as 'Options') was not found in './lib/types' (module has no exports)
  1 | export { useWebSocket as default } from './lib/use-websocket';
  2 |
> 3 | export { SendMessage, Options } from './lib/types';
  4 |
  5 | export { useSocketIO } from './lib/use-socket-io';
  6 |

web compiled with 2 warnings
WARNING in ./node_modules/react-native-use-websocket/lib/module/index.js:3
export 'SendMessage' (reexported as 'SendMessage') was not found in './lib/types' (module has no exports)
  1 | export { useWebSocket as default } from './lib/use-websocket';
  2 |
> 3 | export { SendMessage, Options } from './lib/types';
  4 |
  5 | export { useSocketIO } from './lib/use-socket-io';
  6 |

WARNING in ./node_modules/react-native-use-websocket/lib/module/index.js:3
export 'Options' (reexported as 'Options') was not found in './lib/types' (module has no exports)
  1 | export { useWebSocket as default } from './lib/use-websocket';
  2 |
> 3 | export { SendMessage, Options } from './lib/types';
  4 |
  5 | export { useSocketIO } from './lib/use-socket-io';
  6 |

web compiled with 2 warnings

This is my package json and I have an expo project + ARM m1 mac if it matters:

{
    "name": "best-ai-answer-frontend",
    "version": "1.0.0",
    "main": "node_modules/expo/AppEntry.js",
    "scripts": {
        "start": "expo start",
        "android": "expo start --android",
        "ios": "expo start --ios",
        "web": "expo start --web",
        "build:android": "expo export:android",
        "build:ios": "expo export:ios",
        "build:web": "expo export:web",
        "format": "prettier . --write",
        "format:ci": "prettier . --check",
        "lint": "eslint ./ --fix",
        "lint:ci": "eslint ./"
    },
    "dependencies": {
        "@expo/vector-icons": "~13.0.0",
        "@expo/webpack-config": "~18.0.1",
        "@hookform/resolvers": "^3.1.1",
        "@react-native-async-storage/async-storage": "^1.19.1",
        "@react-native-community/slider": "~4.4.2",
        "@react-navigation/native": "~6.1.7",
        "@react-navigation/native-stack": "~6.9.13",
        "@reduxjs/toolkit": "^1.9.5",
        "@tanstack/react-query": "~4.29.19",
        "axios": "^1.4.0",
        "color": "^4.2.3",
        "date-fns": "^2.30.0",
        "expo": "~48.0.18",
        "expo-asset": "~8.9.1",
        "expo-secure-store": "~12.1.1",
        "expo-splash-screen": "~0.18.2",
        "expo-status-bar": "~1.4.4",
        "lodash": "^4.17.21",
        "react": "18.2.0",
        "react-art": "~18.2.0",
        "react-dom": "~18.2.0",
        "react-hook-form": "^7.45.2",
        "react-native": "0.71.8",
        "react-native-keyboard-aware-scroll-view": "^0.9.5",
        "react-native-paper": "~5.9.1",
        "react-native-reanimated-carousel": "^3.5.1",
        "react-native-safe-area-context": "4.5.0",
        "react-native-screens": "~3.20.0",
        "react-native-svg": "13.4.0",
        "react-native-svg-transformer": "~1.0.0",
        "react-native-swipeable-list": "^0.1.2",
        "react-native-use-websocket": "^0.2.6",
        "react-native-vector-icons": "~9.2.0",
        "react-native-web": "~0.18.12",
        "react-redux": "^8.1.1",
        "redux-saga": "^1.2.3",
        "styled-components": "~5.3.11",
        "zod": "^3.21.4"
    },
    "devDependencies": {
        "@babel/core": "~7.20.0",
        "@tanstack/eslint-plugin-query": "~4.29.9",
        "@types/color": "^3.0.3",
        "@types/date-fns": "^2.6.0",
        "@types/lodash": "^4.14.195",
        "@types/react": "~18.0.14",
        "@types/react-redux": "^7.1.25",
        "@types/redux-saga": "^0.10.5",
        "@types/styled-components-react-native": "~5.2.1",
        "@typescript-eslint/eslint-plugin": "~5.13.0",
        "@typescript-eslint/parser": "~5.13.0",
        "babel-preset-react-native": "^4.0.1",
        "eslint": "~8.44.0",
        "eslint-config-airbnb": "~19.0.4",
        "eslint-config-airbnb-typescript": "~17.0.0",
        "eslint-config-prettier": "~8.8.0",
        "eslint-config-universe": "~11.3.0",
        "eslint-import-resolver-typescript": "~3.5.5",
        "eslint-plugin-prettier": "~5.0.0",
        "eslint-plugin-simple-import-sort": "~10.0.0",
        "prettier": "~3.0.0",
        "react-native-dotenv": "^3.4.9",
        "typescript": "~4.9.4"
    },
    "private": true
}

nicolae536 avatar Jul 29 '23 14:07 nicolae536