Home Articles

Solved! Angular 17 Error: Project target does not exist.

Apr 22, 2024 ∘ Yoko Ishioka
Lost - two arrows and feet

If you're modifying build scripts for an Angular app, you might run into the error:

Project target does not exist.

Why it happened

After creating a new Angular project (ng new, not ng generate app) with Angular 17, I tried to reuse scripts I had created in a different Angular project, but encountered the above error when trying to use them.

It turns out that Angular 17 no longer has a separate build command for SSR! Also, the build will break if you try to use the --production flag.

The fix

Remove the following commands:

build:ssr...
... --production

Prerendering

As a bonus, Angular will also run the prerender command. (It's a setting in angular.json if you want to change it.)