When I try to build React + TypeScript, dfx is unable to deploy the front-end canister. I made changes in webpack and added tsconfig.json. I see the following error log: “error: Failed while trying to deploy canisters. Caused by: Failed while trying to deploy canisters. Failed to build call canisters. Failed while trying to build all canisters. The post-build step failed for canister ‘rno2w-sqaaa-aaaaa-aaacq-cai’ (frontend) with an embedded error: Failed to build frontend for network ‘local’: The command ‘“npm” “run” “build”’ failed with exit status ‘exit status: 127’. Stdout: ‘swap@0.1.0 prebuild\n> npm run generate\n\nswap@0.1.0 generate\n> dfx generate main\n\nswap@0.1.0 build\n> webpack’.”
There’s a basic boilerplate for reference if you are building a React website with Contentful CMS. Deployment will require using dfx. GitHub - therealbryanho/dfinity-websitewithcms