Description
Bug, feature request, or proposal:
When using ng-packagr, I receive a build error "ENOENT: no such file or directory, open '.../node_modules/@angular/packages/material...'
What is the expected behavior?
It packages properly with no build errors.
What is the current behavior?
It errors out and doesn't build successfully but I can do ng build without issues.
What are the steps to reproduce?
- Start a new project using cli.
ng new material-test
- Update dependencies to use @angular/material 2.0.0-beta.12 and all peer dependencies.
- Add ng-packagr to dev dependencies, all necessary files for ng-packagr (public_api & ng-package.json) and run
npm install
. - Import any material module into main app module
- run
ng-packagr -p ng-package.json
.
OR
- Checkout https://github.com/nmrichards/material-issue-project
- run
npm install
- run
npm run packagr
What is the use-case or motivation for changing an existing behavior?
To be able to use ng-packagr with beta.12 in personal libraries.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
@angular 4.4.4
Material 2.0.0-beta.12
TypeScript 2.3.3
Is there anything else we should know?
I also receive messages during the ng-packagr process stating a number of items are imported but never used even if I only import one module from material library. See file below for said messages. In this particular test project, I'm only importing MatIconModule into the main app module. If I run ng-packagr on beta.11, I don't receive the build error but still get the imported but not used messages and it successfully builds. I will also be submitting this to the ng-packagr project as I'm not sure if this an ng-packagr issue or material beta.12 issue but I only get the issue if I import any module from material beta.12. And also putting on Stack Overflow in case it's just an issue that I'm causing due to something I'm doing wrong, in which case I apologize for submitting this issue.
EDIT: ng-packagr issue can be tracked here #172