앱인토스 개발환경 실행시 샌드박스 Metro 문제

안녕하세요. 개발환경 실행 후 샌드박스에서 아래와 같은 에러가 발생합니다.

Building React Native bundle… (platform: ios)
RN ERROR TypeError: property is not configurable, js engine: hermes
RN LOG Running “shared” with {“rootTag”:1,“initialProps”:{“loadingStartTs”:1757914465820,“schemeUri”:“intoss://{앱 이름}”,“networkStatus”:“WIFI”,“initialFontSize”:“Large”,“initialColorPreference”:“dark”,“isVisible”:true}}
RN ERROR Invariant Violation: “shared” has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn’t called., js engine: hermes

관련 package.json은 아래와 같습니다

{
  "name": "toss",
  "private": true,
  "version": "0.0.0",
  "type": "module",
  "scripts": {
    "dev": "granite dev",
    "build": "granite build",
    "lint": "eslint .",
    "preview": "vite preview",
    "deploy": "ait deploy"
  },
  "dependencies": {
    "@apps-in-toss/web-framework": "^1.1.0",
    "@emotion/react": "^11",
    "@toss-design-system/mobile": "^2.1.0",
    "@toss-design-system/mobile-ait": "^2.1.0",
    "react": "^18.3.1",
    "react-dom": "^18.3.1"
  },
  "devDependencies": {
    "@eslint/js": "^9.33.0",
    "@types/react": "^19.1.10",
    "@types/react-dom": "^19.1.7",
    "@vitejs/plugin-react": "^5.0.0",
    "eslint": "^9.33.0",
    "eslint-plugin-react-hooks": "^5.2.0",
    "eslint-plugin-react-refresh": "^0.4.20",
    "globals": "^16.3.0",
    "typescript": "~5.8.3",
    "typescript-eslint": "^8.39.1",
    "vite": "^7.1.2"
  }
}

관련 granite.config.ts 는 아래와 같습니다

import { defineConfig } from "@apps-in-toss/web-framework/config";

export default defineConfig({
  appName: %%{앱 이름}%%,
  brand: {
    displayName: %%{앱 이름}%%, // 화면에 노출될 앱의 한글 이름으로 바꿔주세요.
    primaryColor: "#3182F6", // 화면에 노출될 앱의 기본 색상으로 바꿔주세요.
    icon: "https://static.toss.im/appsintoss/73/10550764-5ac1-44e2-9ff3-ad78d8d2e71a.png", // 예시 이미지.
    bridgeColorMode: "basic",
  },
  web: {
    host: "localhost",
    port: 5173,
    commands: {
      dev: "vite --host",
      build: "tsc -b && vite build",
    },
  },
  permissions: [],
  outdir: "dist",
});

추가로 확인이 필요한 부분은 요청 시, 공유 드리겠습니다.

안녕하세요 :slight_smile:
앱을 종료했다가 다시 실행해도 동일한 이슈가 발생하시나요 ?

안녕하세요! 해당 이슈 해결하였습니다. 감사합니다

1개의 좋아요