Closed
Description
I am trying to build an Angular Library project that has Material installed. It was not working in my original project so I decided to create a new workspace and library project from scratch. Here are the commands I used.
ng new test-workspace --create-application=false
cd .\test-workspace\
ng generate library test
ng add @angular/material
Installing packages for tooling via npm.
Installed packages for tooling via npm.
? Choose a prebuilt theme name, or "custom" for a custom theme: Indigo/Pink
? Set up global Angular Material typography styles? Yes
? Set up browser animations for Angular Material? Yes
UPDATE package.json (1434 bytes)
√ Packages installed successfully.
Could not find the project main file inside of the workspace config (projects/test/src)
After this step I was going to add the following...
"@angular/cdk": "^9.2.1",
"@angular/material": "^9.2.1
...to the peerDependencies of test-workspace\projects\test\package.json but I do not know what do to do with the error I received after trying to install Material. Is this more of a warning than an error?
Could not find the project main file inside of the workspace config (projects/test/src)
Any help would be greatly appreciated.
Thanks
Angular CLI: 9.1.1
Node: 12.16.1
OS: win32 x64
Angular: 9.1.2
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.901.1
@angular-devkit/build-angular 0.901.1
@angular-devkit/build-ng-packagr 0.901.1
@angular-devkit/build-optimizer 0.901.1
@angular-devkit/build-webpack 0.901.1
@angular-devkit/core 9.1.1
@angular-devkit/schematics 9.1.1
@angular/cdk 9.2.1
@angular/cli 9.1.1
@angular/material 9.2.1
@ngtools/webpack 9.1.1
@schematics/angular 9.1.1
@schematics/update 0.901.1
ng-packagr 9.1.1
rxjs 6.5.5
typescript 3.8.3
webpack 4.42.0