angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

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

Open ghost opened this issue 8 years ago • 33 comments

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?

ghost avatar May 25 '18 03:05 ghost

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

jinzhaoyu avatar May 25 '18 03:05 jinzhaoyu

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.

mvelez avatar May 25 '18 03:05 mvelez

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

justindanielclark avatar May 25 '18 03:05 justindanielclark

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

eliteproxy7 avatar May 25 '18 03:05 eliteproxy7

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.

ghost avatar May 25 '18 03:05 ghost

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.

eliteproxy7 avatar May 25 '18 04:05 eliteproxy7

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

SFBorland avatar May 25 '18 04:05 SFBorland

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

ryanzmann avatar May 25 '18 04:05 ryanzmann

Great time to upgrade the CLI haha will try 6.0.3 thanks

pbuhrmann avatar May 25 '18 04:05 pbuhrmann

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

eliteproxy7 avatar May 25 '18 04:05 eliteproxy7

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).

GuodongH avatar May 25 '18 04:05 GuodongH

@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

eliteproxy7 avatar May 25 '18 04:05 eliteproxy7

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.

myklory avatar May 25 '18 04:05 myklory

@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).

GuodongH avatar May 25 '18 04:05 GuodongH

@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"
  }

eliteproxy7 avatar May 25 '18 04:05 eliteproxy7

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

tisotmarcelo avatar May 25 '18 05:05 tisotmarcelo

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
    },

ashleybroughton avatar May 25 '18 05:05 ashleybroughton

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).

moltenkaizen avatar May 25 '18 05:05 moltenkaizen

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

fralewsmi avatar May 25 '18 05:05 fralewsmi

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

thanks guys!

daditangs avatar May 25 '18 05:05 daditangs