-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ng build -prod throws Data path "" should NOT have additional properties (p) #9994
Comments
Same issue for me, it happens on npm start. The weird thing is that the issue appeared on one machine but not another. Here's the error:
|
It seems that the issue is related to the command: after changing it to: Things worked fine. Notice also the proxy config are not being found on the root folder but in the src! |
I get the same error using
|
Got the same issue with ng build --aot -prod --extract-licenses --vendor-chunk --output-hashing=none --build-optimizer
|
^^^
instead of
|
@bvdmitri - you are correct. I was able to successfully build using |
I get the same error running |
Using |
Do you get any errors using |
I do: no error when only using The error appears when I start the same project with parameter In all former setups/versions I never had this problem. But, when I use Here's my environment:
|
@omahjoub yes, I just checked and ng build picks only dev environment. I couldn’t force the cli to pick the proper environment file. Also I realized that in my project “ng build” command is not respecting any parameters in .angular-cli.json file (outDir, deployUrl etc..) and it just picking the default ones. I should manually set this parameters in npm task (ng build —deploy-url=blabla etc). Is it correct behavior for the new version of angular-cli? |
I now set up a new project and upgraded to the latest dependencies (angular I encountered following issues with
Before that I was using Angular CLI |
I just recently updated to 6.0.0-rc.0 after a dependency was unresolvable in 6.0.0-beta.4 (html-webpack-plugin if anyone is interested). I deleted 'node_modules' and 'dist' as stated in the manual for updating local project package. But now I cannot build for custom environments anymore. Whenever I try to run
When I run
Even if I only run
|
My upgrade strategy for the last versions was like this:
This takes about 10-20 minutes, but then you can be sure, that you didn't mess the config up. Every time I tried to manually "upgrade" the project using |
+1 |
I was able to fix this on my project by removing the majority of the -- flags from ng build (--aot --sourcemaps --extract-css etc) and instead use --configuration someName and put all the flags inside the angular.json file under the corresponding configuration. The fact that it's checking schema now is actually pretty cool, because I was previously passing the same flags for ng serve, ng build, & for server build for universal rendering, however some flags aren't actually valid for all 3 types of builds. |
Hi all, In Angular CLI v6 it is by design that arguments only work with the double dash. The correct argument is only Sorry for the confusion. We will add this to the CLI v6 release announcement so that no one else is surprised by it. |
Hello guyz, i solved it by changing the
change to "projects": {
"delegations": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "del",
"schematics": {
"@schematics/angular:component": {
"styleext": "less"
}
}, |
Still facing same error ? |
Hi All, I am facing a very similar issue. One peculiar thing on my side is the file against
my
|
In my case, a friend told me to remove |
Create a fresh ng project using latest angular-cli and compare angular.json with your project's angular.json. |
Check that the @angular/cli version you used to create the project is the same as the one you have listed in the package.json. If they are different then the @angular/cli you crated the project with includes extra or deprecated entries in the angular.json file. To correct it verify which fields are not compatible and remove them, or, re-create the project with compatible @angular/cli versions. |
I've experienced this issue after change the default: @angular-devkit/build-angular:browser in angular.json and start using: @angular-builders/custom-webpack in order to extend environment configurations in the app, the exact error is:
any ideas? |
Yes, I know the reason |
|
I had incorrectly placed the curly brace before mergeStrategies. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Workaround
@bvdmitri discovered (see below) that you can successfully build by using unabbreviated arguments:
Instead of:
Versions
Repro steps
ng build -prod
Note:
ng build
without-prod
builds fine.Observed behavior
Desired behavior
I'd like it to build my project without an error. :)
Mention any other details that might be useful (optional)
As mentioned above:
https://github.com/angular/angular/issues/20360
https://github.com/maciejtreder/angular-universal-pwa/blob/master/src/app/server-app.module.ts
https://github.com/angular/angular/pull/20782
.angular-cli.json
:The text was updated successfully, but these errors were encountered: