aws-amplify error !!! TypeError: Cannot read property 'indexOf' of null

Viewed 775

i'm a beginner and i'm trying to build an angular application with aws-amplify but in the "build" phase i get this error:

[ERROR]: !!! TypeError: Cannot read property 'indexOf' of null

2020-03-29T09:14:11.296Z [INFO]: # Retrieving cache...
2020-03-29T09:14:11.325Z [INFO]: # Extracting cache...
2020-03-29T09:14:11.339Z [INFO]: # Extraction completed
2020-03-29T09:14:11.340Z [INFO]: # Retrieving environment cache...
2020-03-29T09:14:11.358Z [INFO]: # Retrieved environment cache
2020-03-29T09:14:11.359Z [INFO]: # Ensuring NPM package '@aws-amplify/cli' is version: 'latest'
2020-03-29T09:14:19.403Z [INFO]: # Patching NPM package '@aws-amplify/cli' from 1.12.0 to 4.17.2...
2020-03-29T09:15:11.525Z [INFO]: # Done patching NPM package '@aws-amplify/cli'
2020-03-29T09:15:19.608Z [ERROR]: !!! TypeError: Cannot read property 'indexOf' of null
2020-03-29T09:15:19.669Z [INFO]: # Starting environment caching...
2020-03-29T09:15:19.670Z [INFO]: # Environment caching completed

any ideas?

Thanks,

Marco

1 Answers

In case this is an issue for anyone else, this error will happen if you remark out any of the build commands:

Amplify Build Commands

Related