Packaging error after adding dependencies for Angular Material
See original GitHub issueType of Issue
Packaging error
[ x] Bug Report
[ ] Feature Request
Description
- Using Angular CLI to create a new project.
- Add a new module/component (e.g. navbar).
- “ng-packagr -p ng-package.json” works fine.
- Add Angular Material packages:
npm install --save @angular/material @angular/cdk
- Import a material module (e.g. MatToolbarModule) to the new module (navbar).
- “ng-packagr -p ng-package.json” gives the following error
nav-component@0.0.0 packagr C:\work\GitRepos\nav-component ng-packagr -p ng-package.json
Building Angular library
BUILD ERROR ENOENT: no such file or directory, open ‘C:\work\GitRepos\nav-component\node_modules@angular\packages\material\esm5\form-field\error.js.map’ Error: ENOENT: no such file or directory, open ‘C:\work\GitRepos\nav-component\node_modules@angular\packages\material\esm5\form-field\error.js.map’
How To Reproduce
See the Description
Expected Behaviour
Packaging successfully
Version Information
ng-packagr: v1.4.1
node: v8.5.0
@angular: v4.2.4
rxjs: 5.4.2
zone.js: 0.8.14
please include any version information that might be relevant, e.g. other third-party libraries
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Angular Material throw error for dependencies - Stack Overflow
I'm using angular-jwt2 and I think that package is not compatible with @angular/core 6.... If you know what are the problem, I'll thank...
Read more >Schematics - Angular Material
The Angular Material ng add schematic helps you set up an Angular CLI project that uses Material. Running ng add will: Ensure project...
Read more >Getting started - Angular Material
This guide explains how to set up your Angular project to begin using Angular Material. It includes information on prerequisites, installing Angular ...
Read more >Usage of Angular libraries published to npm
Adding a library to the runtime global scopelink · Install the library and the associated dependencies using the npm package manager: content_copy npm...
Read more >Creating libraries - Angular
Angular libraries should list any @angular/* dependencies the library depends on as peer dependencies. This ensures that when modules ask for Angular, they...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Noticed that a solution to this and a discussion around it is found here: https://github.com/angular/material2/issues/7681#issuecomment-335482131
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem. This action has been performed automatically by a bot.