aws-appsync package breaks create-react-app

0

I'm trying to implement Cognito User Pools in my Amplify app via this example (https://docs.amplify.aws/lib/graphqlapi/authz/q/platform/js/#cognito-user-pools). Importing the 'aws-appsync' package yields several errors like:

ERROR in ./node_modules/graphql/index.mjs 25:0-49

Module not found: Error: Can't resolve './version' in 'C:\Users\...\node_modules\graphql'
Did you mean 'version.mjs'?
BREAKING CHANGE: The request './version' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.

I can address this with webpack config, but I'd have to eject my entire app from Create React App OR go the craco/react-app-rewired route. Surely there's an easier way?

질문됨 2년 전76회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠