Im working on a project and pushed manually to my amplify backend until now and set up an hosting env connected to my github branch. But I receive the following error when the build starts via github:
2024-01-17T14:53:56.459Z [INFO]: Received error [Error: Command failed with ENOENT: npm.cmd install --no-bin-links --production spawn npm.cmd ENOENT] running command [npm.cmd install --no-bin-links --production]
These are my build settings:
version: 1
backend:
phases:
build:
commands:
- '# Execute Amplify CLI with the helper script'
- amplifyPush --simple
frontend:
phases:
preBuild:
commands:
- npm ci
build:
commands:
- npm run build
artifacts:
baseDirectory: dist
files:
- '**/*'
cache:
paths:
- node_modules/**/*
and set the Amplify CLI to 12.10.1.
If you are pushing the backend manually, I presume you can be without the backend
amplifypush --simple. Try thisbuild.yml:If this does not work, I would try omitting the cache part.