Skip to content

ng new 'Data path "" should NOT have additional properties(dryRun).' #11006

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

Closed
ghost opened this issue May 25, 2018 · 33 comments
Closed

ng new 'Data path "" should NOT have additional properties(dryRun).' #11006

ghost opened this issue May 25, 2018 · 33 comments

Comments

@ghost
Copy link

ghost commented May 25, 2018

Versions

Angular CLI: 6.0.4
Node: 9.11.1
OS: win32 x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.4
@angular-devkit/core         0.6.4
@angular-devkit/schematics   0.6.4
@schematics/angular          0.6.4
@schematics/update           0.6.4
rxjs                         6.2.0
typescript                   2.7.2

Repro steps

ng new <app name>

Observed behavior

ng new vui
Schematic input does not validate against the Schema: {"dryRun":false,"version":"6.0.4","skipGit":false,"skipInstall":false,"linkCli":false,"commit":true,"newProjectRoot":"projects","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","style":"css","skipTests":false}
Errors:

  Data path "" should NOT have additional properties(dryRun).

Desired behavior

pretty obvious

Mention any other details that might be useful (optional)

Fresh install of the CLI on Windows 10 using Powershell - let me know if this is not supported?

@jinzhaoyu
Copy link

I also encountered !This is my first time use Angular (Angry!!)

Angular CLI: 6.0.4
Node: 10.2.1
OS: darwin x64
Angular:
...

Package Version

@angular-devkit/architect 0.6.4
@angular-devkit/core 0.6.4
@angular-devkit/schematics 0.6.4
@schematics/angular 0.6.4
@schematics/update 0.6.4
rxjs 6.2.0
typescript 2.7.2

@mvelez
Copy link

mvelez commented May 25, 2018

Angular CLI: 6.0.4
Node: 8.10.0
OS: linux x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.4
@angular-devkit/core         0.6.4
@angular-devkit/schematics   0.6.4
@schematics/angular          0.6.4
@schematics/update           0.6.4
rxjs                         6.2.0
typescript                   2.7.2

Happening in ubuntu too.

@justindanielclark
Copy link

justindanielclark commented May 25, 2018

Also running into the same issue. Went to create a new project about an hour ago and ran into the exact same error message as the Original Poster.

Reinstalled Angular with

[sudo] npm uninstall -g angular-cli @angular/cli 
npm cache verify
[sudo] npm install -g @angular/cli 

ng -v returns:

Angular CLI: 6.0.4
Node: 10.1.0
OS: linux x64
Angular: 
... 

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.4
@angular-devkit/core         0.6.4
@angular-devkit/schematics   0.6.4
@schematics/angular          0.6.4
@schematics/update           0.6.4
rxjs                         6.2.0
typescript                   2.7.2

npm -v returns:
6.0.1

@eliteproxy7
Copy link

eliteproxy7 commented May 25, 2018

looks like the issue is with Angular CLI: 6.0.4

downgrade to 6.0.3 and ng new works for me now

npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/[email protected]


## but when I run "ng g c header" i get

Schematic input does not validate against the Schema: {"dryRun":false,"inlineStyle":false,"inlineTemplate":false,"changeDetection":"Default","styleext":"css","spec":true,"flat":false,"skipImport":false,"export":false}
Errors:

  Data path "" should NOT have additional properties(dryRun).

this just started happening

UPDATE (workaround)

in your package.json look for "@angular/compiler-cli": "^6.0.2"

this will install the 6.0.4 which was updated today about 2 hours ago and thats where the issues from from.

workaround

change this
"@angular/compiler-cli": "^6.0.2"
to this
"@angular/compiler-cli": "6.0.3"

this will force it to use 6.0.3

delete your package-lock.json and the node_moudles folder
then run "npm install"


--- make sure you are using CLI 6.0.3 ---- the latest is 6.0.4 and it will not work with this

@ghost
Copy link
Author

ghost commented May 25, 2018

Confirmed downgrading to 6.0.3 resolves the issue, it was introduced in 6.0.4.

Edit: confirmed the above issue. Looks like ng g doesn't work for 6.0.3 or 6.0.2.

@eliteproxy7
Copy link

my guess is its coming from @Angular-devkit

looks like there was an update about 2 hours ago and that is that started these errors.

@SFBorland
Copy link

eliteproxy7, your npm version install is wrong, you have 6.03, it should be 6.0.3

@ryanzmann
Copy link

ryanzmann commented May 25, 2018

Can confirm:
npm install -g @angular/[email protected]
works

@pbuhrmann
Copy link

Great time to upgrade the CLI haha will try 6.0.3 thanks

@eliteproxy7
Copy link

@fishslicer good catch just fixed it. also the ng g function was messing up to I added the fix for that as well

@GuodongH
Copy link

GuodongH commented May 25, 2018

Same version as @justindanielclark, do the following:

npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/[email protected]

however, create component using ng g c heroes still meet the same problem:

Schematic input does not validate against the Schema: {"dryRun":false,"inlineStyle":false,"inlineTemplate":false,"changeDetection":"Default","styleext":"css","spec":true,"flat":false,"skipImport":false,"export":false}
Errors:

  Data path "" should NOT have additional properties(dryRun).

@eliteproxy7
Copy link

@GuodongH

2 things

  1. as it was pointed out it should be 6.0.3 instead of 6.03 that was a type from my end sorry.
  2. i updated my post read under "UPDATE (workaround)" that will fix the generating issue from schematics

@myklory
Copy link

myklory commented May 25, 2018

Did angular update to 6.0.4 today? Last night all things were correct,today I install angular at a new computer give me this error message.

@GuodongH
Copy link

GuodongH commented May 25, 2018

@eliteproxy7
Thank you.
I had a typo too, I type npm install -g @angular/[email protected] at the first time, but it did not work.

Update:
I follow the step by @eliteproxy7 , however, it still can not work in my computer, below is my steps:

  1. change "@angular/compiler-cli": "^6.0.0" to "@angular/compiler-cli": "6.0.3" in package.json; and delete the file package-lock.json
  2. do the commands:
npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/[email protected]
  1. npm install
  2. ng g c test, and it show the same error:
Schematic input does not validate against the Schema: {"dryRun":false,"inlineStyle":false,"inlineTemplate":false,"changeDetection":"Default","styleext":"css","spec":true,"flat":false,"skipImport":false,"export":false}
Errors:

  Data path "" should NOT have additional properties(dryRun).

@eliteproxy7
Copy link

@GuodongH

make sure your devDepencies in package.json looks like this .. make to check the number and the character that is right before the version numbers

"devDependencies": {
    "@angular/compiler-cli": "6.0.3",
    "@angular-devkit/build-angular": "0.6.3",
    "typescript": "~2.7.2",
    "@angular/cli": "6.0.3",
    "@angular/language-service": "^6.0.2",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "~4.2.1",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~1.7.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~1.4.2",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.3.0",
    "ts-node": "~5.0.1",
    "tslint": "~5.9.1"
  }

@tisotmarcelo
Copy link

I got the same issue....cant fix it

@ashleybroughton
Copy link

ashleybroughton commented May 25, 2018

This might not be best practice, but adding the dryRun property to the schema will let you run on the latest version without this problem.

%appdata%\npm\node_modules\@angular\cli\node_modules\@schematics\angular\ng-new\schema.json

  "properties": {
    "dryRun": {
      "description": "Dryrun",
      "type": "boolean",
      "default": false
    },

@moltenkaizen
Copy link

Downgraded to 6.0.3 on linux, fixed. Downgraded to 6.0.3 on macOS, still Data path "" should NOT have additional properties(dryRun). when I try to generate a component.

It seems like the angular cli is upgrading the cli version from 6.0.3 -> 6.0.4 when I create a new project.

dudes-MacBook-Pro:tmp dude$ ng -v

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.0.3
Node: 10.1.0
OS: darwin x64
Angular:
...

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.6.3
@angular-devkit/core         0.6.3
@angular-devkit/schematics   0.6.3
@schematics/angular          0.6.3
@schematics/update           0.6.3
rxjs                         6.2.0
typescript                   2.7.2

dudes-MacBook-Pro:tmp dude$ ng new fancy-project
CREATE fancy-project/README.md (1029 bytes)
CREATE fancy-project/angular.json (3460 bytes)
CREATE fancy-project/package.json (1317 bytes)
CREATE fancy-project/tsconfig.json (384 bytes)
CREATE fancy-project/tslint.json (2805 bytes)
CREATE fancy-project/.editorconfig (245 bytes)
CREATE fancy-project/.gitignore (503 bytes)
CREATE fancy-project/src/environments/environment.prod.ts (51 bytes)
CREATE fancy-project/src/environments/environment.ts (631 bytes)
CREATE fancy-project/src/favicon.ico (5430 bytes)
CREATE fancy-project/src/index.html (299 bytes)
CREATE fancy-project/src/main.ts (370 bytes)
CREATE fancy-project/src/polyfills.ts (3194 bytes)
CREATE fancy-project/src/test.ts (642 bytes)
CREATE fancy-project/src/assets/.gitkeep (0 bytes)
CREATE fancy-project/src/styles.css (80 bytes)
CREATE fancy-project/src/browserslist (375 bytes)
CREATE fancy-project/src/karma.conf.js (964 bytes)
CREATE fancy-project/src/tsconfig.app.json (194 bytes)
CREATE fancy-project/src/tsconfig.spec.json (282 bytes)
CREATE fancy-project/src/tslint.json (314 bytes)
CREATE fancy-project/src/app/app.module.ts (314 bytes)
CREATE fancy-project/src/app/app.component.css (0 bytes)
CREATE fancy-project/src/app/app.component.html (1141 bytes)
CREATE fancy-project/src/app/app.component.spec.ts (996 bytes)
CREATE fancy-project/src/app/app.component.ts (207 bytes)
CREATE fancy-project/e2e/protractor.conf.js (752 bytes)
CREATE fancy-project/e2e/src/app.e2e-spec.ts (299 bytes)
CREATE fancy-project/e2e/src/app.po.ts (208 bytes)
CREATE fancy-project/e2e/tsconfig.e2e.json (213 bytes)

> [email protected] install /private/tmp/fancy-project/node_modules/fsevents
> node install

[fsevents] Success: "/private/tmp/fancy-project/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" already installed
Pass --update-binary to reinstall or --build-from-source to recompile

> [email protected] install /private/tmp/fancy-project/node_modules/node-sass
> node scripts/install.js

Cached binary found at /Users/dude/.npm/node-sass/4.9.0/darwin-x64-64_binding.node

> [email protected] postinstall /private/tmp/fancy-project/node_modules/node-sass
> node scripts/build.js

Binary found at /private/tmp/fancy-project/node_modules/node-sass/vendor/darwin-x64-64/binding.node
Testing binary
Binary is fine

> @angular/[email protected] postinstall /private/tmp/fancy-project/node_modules/@angular/cli
> node ./bin/ng-update-message.js

added 1135 packages in 16.305s
    Successfully initialized git.
dudes-MacBook-Pro:tmp dude$ cd fancy-project/
dudes-MacBook-Pro:fancy-project dude$ ng -v

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/


Angular CLI: 6.0.4
Node: 10.1.0
OS: darwin x64
Angular: 6.0.3
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.4
@angular-devkit/build-angular     0.6.4
@angular-devkit/build-optimizer   0.6.4
@angular-devkit/core              0.6.4
@angular-devkit/schematics        0.6.4
@angular/cli                      6.0.4
@ngtools/webpack                  6.0.4
@schematics/angular               0.6.4
@schematics/update                0.6.4
rxjs                              6.2.0
typescript                        2.7.2
webpack                           4.6.0

dudes-MacBook-Pro:fancy-project dude$ ng generate component fancy-component
Schematic input does not validate against the Schema: {"dryRun":false,"inlineStyle":false,"inlineTemplate":false,"changeDetection":"Default","styleext":"css","spec":true,"flat":false,"skipImport":false,"export":false}
Errors:

  Data path "" should NOT have additional properties(dryRun).

@fralewsmi
Copy link

Confirming rolling back to @angular/[email protected] fixes this issue, but hopefully we'll get a patch asap

@daditangs
Copy link

daditangs commented May 25, 2018

i was running on angular/cli 6.0.4 , i encountered same issue. changed it to 6.0.3..

thanks guys!

@moltenkaizen
Copy link

moltenkaizen commented May 25, 2018

Looks like the new 6.0.5 version fixes, thanks @hansl !

@fralewsmi
Copy link

Confirmed this issue is fixed in https://github.com/angular/angular-cli/releases/tag/v6.0.5

@ashleybroughton
Copy link

"Fixed" as in they re-release 6.0.3 with a version bump.

@Brocco
Copy link
Contributor

Brocco commented May 25, 2018

This issue has been addressed in 2 ways...

  1. Version 6.0.5 was released, which is the same as version 6.0.3
  2. A PR was merged to be included in a future release to resolve this issue in the future fix(@angular/cli): Fix removal of non-schematic options #11015

Apologies for any issues this may have caused.

@Brocco Brocco closed this as completed May 25, 2018
@playground
Copy link

I'm having this issue after updating to 6.1.2

ng g application my-app --service-worker --style=scss
Schematic input does not validate against the Schema: {"serviceWorker":true,"style":"scss","inlineStyle":false,"inlineTemplate":false,"routing":false,"prefix":"app","skipTests":false,"skipPackageJson":false}
Errors:

Data path "" should NOT have additional properties(serviceWorker).

@oluwatimio
Copy link

Same. Im having this issue on 6.0.8 trying to add @angular/pwa created an issue here #11777

@marc-wilson
Copy link

Running into this same issue in v 6.1.2

Angular CLI: 6.1.2
Node: 8.11.2
OS: darwin x64
Angular: 6.1.2
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.7.2
@angular-devkit/build-angular 0.7.2
@angular-devkit/build-optimizer 0.7.2
@angular-devkit/build-webpack 0.7.2
@angular-devkit/core 0.7.2
@angular-devkit/schematics 0.7.2
@ngtools/webpack 6.1.2
@schematics/angular 0.7.2
@schematics/update 0.7.2
rxjs 6.2.2
typescript 2.7.2
webpack 4.9.2

The error happens when I run ng generate library in src directory.

@localdevm
Copy link

@mswilson4040 have you found a fix for this issue? Bumping into the same

@realtomaszkula
Copy link

Updating the CLI seems to fix the issue. Just run npm install -g @angular/cli

@SharmaTushar
Copy link

SharmaTushar commented Sep 15, 2018

I'm on 6.1.1 and facing the same issue.
Edit: Uninstalled @angular/cli, cleared npm cache (cache verify didn't help), and moved to version 6.2.2. Works now.

@simplon-romainB
Copy link

i have the same issue moved on 6.2.2 (from 6.2.5) but doesn't work (@angular/compiler-cli 6.1.10)

@kedar9444
Copy link

can i add script tag under

"architect": {
        "build": {
          "options": {

"scripts": ["./node_modules/@angular/cli/lib/config/schema.json"]
}
}
}

for angular library ? like angular application.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests