chihab / dotenv-run

Seamlessly load environment variables. Supports cli, esbuild, rollup, vite, webpack, angular. ESM and Monorepos.
238 stars 17 forks source link

Schema validation failed on `ng serve` #74

Closed JeffreyArt1 closed 7 months ago

JeffreyArt1 commented 7 months ago

I recently upgraded Angular to v17.1.0 and ng serve is outputting this error message:

Error: Schema validation failed with the following errors:
  Data path "" must have required property 'main'.

It seems that ng build is not affected by this issue tho.

To reproduce this issue: install a new app ng new <app> and add the builder ng add @ngx-env/builder

Smerlyn-Javier commented 7 months ago

I have the same issue 🫤, thanks @JeffreyArt1. ⭐️

chihab commented 7 months ago

I've published a new version of the builder @ngx-env/builder@17.1.0 npx ng add @ngx-env/builder@latest

JeffreyArt1 commented 7 months ago

Still having the same issue with the new version @ngx-env/builder@17.1.0

Error: Schema validation failed with the following errors:
  Data path "" must have required property 'main'.

Do i have to add anything into angular.json?

chihab commented 7 months ago

What version did you have before?

JeffreyArt1 commented 7 months ago

What version did you have before?

v17.0.9

chihab commented 7 months ago

Fix published, could you give it another try please? npx ng add @ngx-env/builder@latest

JeffreyArt1 commented 7 months ago

It worked! thanks