Perform any of the following options as long as there is an error
-
For passing an argument to build command:
change ‘npm run build — –prod’ to ‘npm run build –prod’ in the .csproj file
-
Open ClientApp folder and Update project angular-cli with this CMD command:
npm install –save-dev @angular/cli@latest
-
Update visual studio NodeJS and npm from:
Tools > Options > Projects and Solutions > Web Package Management > External
Web Tools
If NodeJS and npm aren’t installed on your environment path Add NodeJS and npm folder to the top of the list else move $(path) to the top of the list
.
Thank @Praveen Kumar and @Yerkon