Skip to content

Expo + @aws-sdk/client-location: Static class blocks are not enabled #7046

@ilfoxo

Description

@ilfoxo

Checkboxes for prior research

Describe the bug

Expo + @aws-sdk/client-location": "^3.799.0", giving an error:

 ERROR  node_modules\@aws-sdk\client-location\dist-cjs\index.js: C:\Development\Expo\akiatracker3\node_modules\@aws-sdk\client-location\dist-cjs\index.js: Static class blocks are not enabled. Please add `@babel/plugin-transform-class-static-block` to your configuration.
  257 |
  258 | // src/LocationClient.ts
> 259 | var LocationClient = class extends import_smithy_client.Client {
      |                      ^
  260 |   static {
  261 |     __name(this, "LocationClient");
  262 |   }

This is my package.json:


{
  "name": "akiatracker3",
  "main": "expo-router/entry",
  "version": "1.0.0",
  "scripts": {
    "start": "expo start",
    "reset-project": "node ./scripts/reset-project.js",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web",
    "test": "jest --watchAll",
    "lint": "expo lint"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "@aws-amplify/react-native": "^1.1.9",
    "@aws-amplify/ui-react-native": "^2.5.2",
    "@aws-sdk/client-location": "^3.799.0",
    "@expo/vector-icons": "^14.0.2",
    "@react-native-async-storage/async-storage": "1.23.1",
    "@react-navigation/bottom-tabs": "^7.2.0",
    "@react-navigation/native": "^7.0.14",
    "aws-amplify": "^6.14.4",
    "expo": "~52.0.46",
    "expo-blur": "~14.0.3",
    "expo-constants": "~17.0.8",
    "expo-dev-client": "~5.0.20",
    "expo-font": "~13.0.4",
    "expo-haptics": "~14.0.1",
    "expo-linking": "~7.0.5",
    "expo-router": "~4.0.20",
    "expo-splash-screen": "~0.29.24",
    "expo-status-bar": "~2.0.1",
    "expo-symbols": "~0.2.2",
    "expo-system-ui": "~4.0.9",
    "expo-web-browser": "~14.0.2",
    "nativewind": "^4.1.23",
    "react": "18.3.1",
    "react-dom": "18.3.1",
    "react-native": "0.76.9",
    "react-native-gesture-handler": "~2.20.2",
    "react-native-reanimated": "3.16.2",
    "react-native-safe-area-context": "4.12.0",
    "react-native-screens": "~4.4.0",
    "react-native-web": "~0.19.13",
    "react-native-webview": "13.12.5",
    "tailwindcss": "^3.4.17"
  },
  "devDependencies": {
    "@babel/core": "^7.25.2",
    "@types/jest": "^29.5.12",
    "@types/react": "~18.3.12",
    "@types/react-test-renderer": "^18.3.0",
    "jest": "^29.2.1",
    "jest-expo": "~52.0.6",
    "react-test-renderer": "18.3.1",
    "typescript": "^5.3.3"
  },
  "private": true
}

I solved the issue installing @aws-sdk/client-location@3.682.0

I checked this similiar issue: #6828 without success for version 3.799.0

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/client-location": "^3.799.0

Which JavaScript Runtime is this issue in?

React Native

Details of the browser/Node.js/ReactNative version

node -v v22.14.0

Reproduction Steps

  1. Create an expo app v52
  2. Install package.json
  3. Run the app

Observed Behavior

ERROR node_modules@aws-sdk\client-location\dist-cjs\index.js: C:\Development\Expo\akiatracker3\node_modules@aws-sdk\client-location\dist-cjs\index.js: Static class blocks are not enabled. Please add @babel/plugin-transform-class-static-block to your configuration.
257 |
258 | // src/LocationClient.ts

259 | var LocationClient = class extends import_smithy_client.Client {
| ^
260 | static {
261 | __name(this, "LocationClient");
262 | }

Expected Behavior

run the app

Possible Solution

I downgraded to version @aws-sdk/client-location": "^3.682.0

Additional Information/Context

No response

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.closed-for-stalenessp3This is a minor priority issueresponse-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions