Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running error #654

Closed
leftstick opened this issue Mar 2, 2018 · 7 comments
Closed

running error #654

leftstick opened this issue Mar 2, 2018 · 7 comments

Comments

@leftstick
Copy link

leftstick commented Mar 2, 2018

Type of Issue

[ ] Bug Report

Description

While running with ng-packagr -p package.json, i got following error

Building Angular Package
Building entry point 'angular2-test-lib'
Cleaning build directory
Rendering Stylesheets
Rendering Templates
Compiling TypeScript sources through ngc
Bundling to FESM15
'ElementRef' is imported from external module '@angular/core' but never used
Bundling to FESM5
Bundling to UMD
Minifying UMD bundle
Dropping unreachable code [0:40,0]
Declarations in unreachable code! [0:40,0]
Relocating source maps
Copying staged files
Writing package metadata
Built angular2-test-lib
Built Angular Package!
- from: /Users/admin/codes/github/angular2-test-lib
- to:   /Users/admin/codes/github/angular2-test-lib/dist
(node:2906) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '.ng_pkg_build/angular2-test-lib/out/node_modules/rxjs/operator/retry.d.ts'
(node:2906) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2906) [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..

Here are my dependencies list:

"@angular/cli": "^1.5.0",
"@angular/common": "~5.0.0",
"@angular/compiler": "~5.0.0",
"@angular/compiler-cli": "~5.0.0",
"@angular/core": "~5.0.0",
"@angular/platform-browser": "~5.0.0",
"@angular/platform-browser-dynamic": "~5.0.0",
"@angular/router": "~5.0.0",
"core-js": "^2.5.3",
"ng-packagr": "^2.1.0",
"rxjs": "^5.5.6",
"typescript": "2.6.2",
"zone.js": "^0.8.18"

How To Reproduce

Nothing special in my package.json, just like your example

Expected Behaviour

I hope the libs can be generated without any error

Version Information

$ node_modules/.bin/ng-packagr --version
ng-packagr:            2.1.0
@angular/compiler:     5.0.5
@angular/compiler-cli: 5.0.5
rollup:                0.55.5
tsickle:               0.27.2
typescript:            2.4.2
@about-code
Copy link

Seems to be a duplicate of #589

@FirstVertex
Copy link

@about-code please re-open this issue.
it is not a duplicate of #589
this error is specifically about 'ElementRef' is imported from external module '@angular/core' but never used which is never mentioned on 589.

@alan-agius4
Copy link
Member

@hughanderson4 the issue you are mentioning relates to
angular/angular#21280

@about-code
Copy link

about-code commented Jan 9, 2019

@leftstick would you mind reopen this issue? @hughanderson4 is right in that he points onto the ''ElementRef'-message. I was probably distracted by the 'UnhandledPromiseRejectionWarning' when classifying this as a duplicate.

@leftstick leftstick reopened this Jan 9, 2019
@sergiubologa
Copy link

Does anyone have a workaround for this issue?

@alan-agius4
Copy link
Member

Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases.
If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

@github-actions
Copy link

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.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants