Using Amplify to deploy my React app (created with create-react-app
) and I get the following error.
2022-04-26T18:52:09.555Z [INFO]: Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/Buttons.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/Buttons.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/Content.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/Content.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/CustomIcon.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/CustomIcon.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/ErrorIcon.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/ErrorIcon.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/InfoIcon.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/InfoIcon.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/Input.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/Input.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/Overlay.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/Overlay.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/SuccessIcon.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/SuccessIcon.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/SweetAlert.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/SweetAlert.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/Title.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/Title.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/ValidationMessage.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/ValidationMessage.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/WarningIcon.tsx' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/components/WarningIcon.tsx'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/constants/patterns.ts' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/constants/patterns.ts'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/default-props.ts' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/default-props.ts'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/index.ts' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/index.ts'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/prop-types.ts' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/prop-types.ts'
Failed to parse source map from '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/styles/SweetAlertStyles.ts' file: Error: ENOENT: no such file or directory, open '/codebuild/output/src963792318/src/pn-toolbox-react/node_modules/react-bootstrap-sweetalert/src/styles/SweetAlertStyles.ts'
I checked the solution provided here AWS Amplify: DevTools failed to load SourceMap: Unexpected token < in JSON at position 0 but that is already configured as such.
Thanks to a colleague's assistance, this resolved this issue.
Add "GENERATE_SOURCEMAP=false
to the "build"
line:
Before
"build": "react-scripts build",
After
"build": "GENERATE_SOURCEMAP=false react-scripts build",