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.
No missing peer dependency warnings.
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:
System:
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.
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.
Most helpful comment
I was able to resolve the issue by specifying my project name:
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.