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.

ng-packagr works fine but with warnings!

See original GitHub issue

Type of Issue

[ ] Bug Report
[ ] Feature Request
[x] Others

Description

When we run ng-packagr we get warning from node. Is that a bug or do we something wrong?

ng-package.json

{
  "$schema": "./node_modules/ng-packagr/package.schema.json",
  "dest": "./",
  "deleteDestPath": false,
  "whitelistedNonPeerDependencies": ["."],
  "keepLifecycleScripts": true,
  "lib": {
    "entryFile": "./public_api.ts",
    "languageLevel": ["dom", "es2017"]
  }
}

Output:

> ng-packagr

Building Angular Package
Building entry point '@honey.glass/matmedia'
Cleaning build directory
Rendering Stylesheets
Rendering Templates
Compiling TypeScript sources through ngc
Bundling to FESM15
Bundling to FESM5
Bundling to UMD
Minifying UMD bundle
Relocating source maps
Copying staged files
Writing package metadata
You enabled keepLifecycleScripts explicitly. The scripts section in package.json will be published to npm.
Creating package .tgz
Built foo/matmedia
Built Angular Package!
- from: packages/matmedia
- to:   packages/matmedia

(node:75096) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, chmod '.ng_pkg_build/honey.glass-matmedia/out/node_modules/injection-js/metadata.d.ts'
(node:75096) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

on each run (ng-packagr) there are different warnings

(node:75725) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, open '.ng_pkg_build/honey.glass-matmedia/out/node_modules/rxjs/operator/windowCount.d.ts'
(node:75725) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Version Information

$ node_modules/.bin/ng-packagr --version
ng-packagr: 2.4.1
@angular/compiler: 5.2.9
@angular/compiler-cli: 5.2.9
rollup: 0.55.5
tsickle: 0.27.2
typescript: 2.5.3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
igabeszcommented, Mar 29, 2018

Yep, same error here. I got this for <project>\.ng_pkg_build\duelbox-jigs\out\node_modules\reflect-metadata\Reflect.d.ts'. Then I added import 'reflect-metadata'; to the entry file which solved the error. Now I’m wrestling with RxJs imports… Will report back if something found.

0reactions
github-actions[bot]commented, Dec 13, 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

ng-packagr gives No name was provided for external module
I was working with an npm module called katex. Adding this to the umdModuleIds in the ./projects/myLibname/ng-package.json worked for me.
Read more >
Creating libraries - Angular
The ng generate command creates the projects/my-lib folder in your workspace, which contains a component and a service inside an NgModule. For more...
Read more >
ng-packagr - npm
Compile and package Angular libraries in Angular Package Format (APF). Latest version: 14.2.1, last published: 19 days ago.
Read more >
Do you specify umdmoduleIds in ng-packager or ignore the ...
WARNING : No name was provided for external module There are ~20 packages throwing this warning. and it is always "guessing" one fine....
Read more >
Experimental Studies of Front-of-Package Nutrient Warning ...
More research is needed to understand whether and how nutrient warnings work in ... of the “warning” aspect of labels is needed, as...
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