이 글의 성격은 무엇인가요?
질문 / 문제 해결
내용을 설명해주세요
패키지 업데이트 후 빌드 에러가 발생합니다..!
참고 할 수 있는 문서가 있을까요?
에러 상황
ERROR SyntaxError: Invalid RegExp: Invalid escape, js engine: hermes
LOG Running "shared" with {"initialProps":{"initialColorPreference":"light","loadingStartTs":1770262249843,"initialFontScale":"115"},"rootTag":11}
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
"@granite-js/native": "0.1.34",
"react": "18.2.0",
"react-native": "0.72.6",
"@apps-in-toss/framework": "^1.5.3",
"@granite-js/plugin-router": "0.1.34",
"@granite-js/plugin-hermes": "0.1.34",
"babel-preset-granite": "0.1.34",
_app.tsx / granite.config.ts
//_app.tsx
import React, { PropsWithChildren, Suspense } from 'react';
import { Analytics } from '@apps-in-toss/framework';
import { Granite, InitialProps } from '@granite-js/react-native';
import { QueryClientProvider } from '@tanstack/react-query';
import { TDSProvider } from '@toss/tds-react-native';
import { context } from '../require.context';
import Loading from './components/commons/Loading';
import { QueryErrorBoundary } from './components/commons/QueryErrorBoundary';
import { queryClient } from './configs/query-config';
function AppContainer({ children }: PropsWithChildren<InitialProps>) {
Analytics.init({
logger(params) {},
});
return (
<QueryClientProvider client={queryClient}>
<QueryErrorBoundary>
<Suspense fallback={<Loading />}>
<TDSProvider colorPreference={'light'}>{children}</TDSProvider>
</Suspense>
</QueryErrorBoundary>
</QueryClientProvider>
);
}
// TODO: 운영 적용
export default Granite.registerApp(AppContainer, {
appName: 'safejibsa-dev',
context,
});
//granite.config.ts
import { appsInToss } from '@apps-in-toss/framework/plugins';
import { hermes } from '@granite-js/plugin-hermes';
import { router } from '@granite-js/plugin-router';
import { defineConfig } from '@granite-js/react-native/config';
export default defineConfig({
scheme: 'granite',
appName: 'safejibsa-dev',
plugins: [
appsInToss({
permissions: [
{
name: 'clipboard',
access: 'read',
},
{
name: 'clipboard',
access: 'write',
},
{
name: 'contacts',
access: 'read',
},
{
name: 'photos',
access: 'read',
},
{
name: 'camera',
access: 'access',
},
{
name: 'geolocation',
access: 'access',
},
],
brand: {
displayName: '안전집사(개발)',
primaryColor: '#1B64DA',
icon: 'https://static.toss.im/appsintoss/51/ca2ce529-ed84-40de-b80d-3a4a1cc7a31c',
},
navigationBar: {
withHomeButton: false,
withBackButton: true,
},
}),
router(),
hermes(),
],
});





