Kendo-angular: ng add doesn't add all required dependencies

Created on 29 May 2018  ·  5Comments  ·  Source: telerik/kendo-angular

I'm submitting a...

  • Bug report

Current behavior

running ng add @progress/kendo-angular-grid on Angular 6 doesn't install all dependencies, according to NPM messages. Also receive obscure "Cannot read property 'options' of undefined" message.

Expected behavior

No missing peer dependency warnings.

Minimal reproduction of the problem with instructions

Environment

Package versions:

├── @angular-devkit/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @ng-bootstrap/[email protected]
├── @ngx-translate/[email protected]
├── @ngx-translate/[email protected]
├── UNMET PEER DEPENDENCY @progress/kendo-angular-buttons@^4.0.0
├── UNMET PEER DEPENDENCY @progress/kendo-angular-dateinputs@2 - 3
├── UNMET PEER DEPENDENCY @progress/kendo-angular-dropdowns@2 - 3
├── UNMET PEER DEPENDENCY @progress/kendo-angular-excel-export@1 - 2
├── @progress/[email protected]
├── UNMET PEER DEPENDENCY @progress/kendo-angular-inputs@2 - 3
├── UNMET PEER DEPENDENCY @progress/kendo-angular-intl@^1.0.0
├── UNMET PEER DEPENDENCY @progress/kendo-angular-l10n@^1.1.0
├── UNMET PEER DEPENDENCY @progress/kendo-angular-popup@^2.0.0
├── UNMET PEER DEPENDENCY @progress/kendo-data-query@^1.0.0
├── UNMET PEER DEPENDENCY @progress/kendo-drawing@^1.0.0
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Browser:

  • Chrome (desktop) version XX
  • Chrome (Android) version XX
  • Chrome (iOS) version XX
  • Firefox version XX
  • Safari (desktop) version XX
  • Safari (iOS) version XX
  • IE version XX
  • Edge version XX

System:

  • TypeScript version: XX
  • Node version: XX
    9.6.1 and 6.0.1
  • Platform:
    Mac

output of command:

MacBook-Pro:envoy-client username$ ng add @progress/kendo-angular-grid
Installing packages for tooling via npm.
Cannot read property 'options' of undefined

I have also:

blown out node-modules
removed package-lock.json
ran npm cache clean --force
ran npm install

retried npm add...

Also, the schematics didn't install any theming or styles.

schematics

Most helpful comment

I was able to resolve the issue by specifying my project name:

ng add @progress/kendo-angular-buttons --project TheProjectName

This might be an opportunity to notate on the Angular 6 CLI docs the potential need for such specification. I don't have more than one project specified in my angular.json file, so I'm not sure how my particular use case varies, but this is for an existing--versus quick start--project.

EDIT: (Actually, I do have 2 projects, the other is an e2e project, which is not the default project, which is probably a common use case).

Thanks.

All 5 comments

Attempting any install has the same behavior:

Kriss-MBP:envoy-client username$ ng add @progress/kendo-angular-buttons
Installing packages for tooling via npm.
(dynamic progress bar installs some dependencies)

result:

npm WARN @progress/[email protected] requires a peer of @progress/kendo-angular-l10n@^1.1.0 but none is installed. You must install peer dependencies yourself.

+ @progress/[email protected]
added 4 packages from 1 contributor and audited 21945 packages in 10.896s
found 0 vulnerabilities

Installed packages for tooling via npm.
Cannot read property 'options' of undefined

no styles or themes installed

this is being run from my project root

I was able to resolve the issue by specifying my project name:

ng add @progress/kendo-angular-buttons --project TheProjectName

This might be an opportunity to notate on the Angular 6 CLI docs the potential need for such specification. I don't have more than one project specified in my angular.json file, so I'm not sure how my particular use case varies, but this is for an existing--versus quick start--project.

EDIT: (Actually, I do have 2 projects, the other is an e2e project, which is not the default project, which is probably a common use case).

Thanks.

Hey @av8orbynight , thank you for contacting us.

It seems that you are executing ng add within the e2e project folder. Currently ng add of Kendo UI package will ignore the e2e project. The reasoning behind this is that you won't need our components in the e2e project. It is similar to what @angular/material does.

That said specifying the project name is a valid approach in this case.

I get these warnings too. (WIndows 10 x64)

Hey @destus90

When you run ng add @progress/kendo-angular-buttons the angular/cli first installs the @progress/kendo-angular-buttons package. As the package has peer dependencies listed in the package.json npm will print a warning that there are unmet peer dependencies.

After the package has been installed the angular cli will run our schematics script which will install these dependencies.

That said the message you see is expected. If you inspect the installed node_modules you should see that all peer dependencies are installed.

Was this page helpful?
0 / 5 - 0 ratings