question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Packaging error after adding dependencies for Angular Material

See original GitHub issue

Type of Issue

Packaging error

[ x] Bug Report
[ ] Feature Request

Description

  1. Using Angular CLI to create a new project.
  2. Add a new module/component (e.g. navbar).
  3. “ng-packagr -p ng-package.json” works fine.
  4. Add Angular Material packages: npm install --save @angular/material @angular/cdk
  5. Import a material module (e.g. MatToolbarModule) to the new module (navbar).
  6. “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:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
bjornalmcommented, Oct 13, 2017

Noticed that a solution to this and a discussion around it is found here: https://github.com/angular/material2/issues/7681#issuecomment-335482131

0reactions
github-actions[bot]commented, Jun 19, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found