AWS Amplify React build failed Module parse failed: Unexpected token (1:0)

Viewed 147

I have created a normal React project via the CLI and am currently getting a build error on AWS Amplify and pointing to a svg file.

Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file

I've not manually added web pack to my project so why is this error occurring? If I run npm start build locally everything is working fine.

This are my dependencies in package.json

"dependencies": {
"@aws-amplify/ui-react": "^1.2.5",
"@babel/preset-es2015": "^7.0.0-beta.53",
"@craco/craco": "^6.1.2",
"@headlessui/react": "^1.2.0",
"@heroicons/react": "^1.0.1",
"@material-ui/core": "^4.12.3",
"@tailwindcss/forms": "^0.3.3",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"aws-amplify": "^4.1.3",
"date-fns": "^2.22.1",
"formik": "^2.2.9",
"i18next": "^20.3.2",
"initials": "^3.1.1",
"lodash": "^4.17.21",
"next": "^10.2.0",
"next-preload-headers": "^3.0.4",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-feather": "^2.0.9",
"react-i18next": "^11.11.0",
"react-mega-menu": "^1.0.1",
"react-progressbar": "^15.4.1",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"react-spinners": "^0.11.0",
"react-table": "^7.7.0",
"web-vitals": "^1.0.1",
"yup": "^0.32.9"

},

0 Answers
Related