ng-packagr: UnhandledPromiseRejectionWarning on ng-packagr@2.0.0-rc.13
Type of Issue
[X] Bug Report
[ ] Feature Request
Description
1st
(node:54348) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '.ng_build/<library_name>/out/node_modules/license-webpack-plugin/dist/FileUtils.d.ts'
2nd
(node:48908) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, chmod '.ng_build/<library_name>/out/node_modules/ionic-angular/util/debouncer.d.ts'
3rd
(node:48800) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '.ng_build/<library_name>/out/node_modules/rxjs/operator/findIndex.d.ts'
Other logs
(node:54348) 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:54348) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with anon-zero exit code.
How To Reproduce
After my library update ng-packagr to version 2.0.0-rc.13, it always be built failed.
Those error won’t be the same everytime.
Downgrade to 2.0.0-rc.12 is fine.
Expected Behaviour
Can build my app
Version Information
ng-packagr: 2.0.0-rc.13
@angular/*: 5.0.3
typescript: 2.4.2
rxjs: 5.5.2
node: 9.4.0
npm/yarn: 5.6.0
please include any version information that might be relevant, e.g. other third-party libraries
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 11
- Comments: 25 (4 by maintainers)
Commits related to this issue
- moved public_api.ts to src directory to resolve strange issue https://github.com/dherges/ng-packagr/issues/589 — committed to thm1118/angular2-baidu-map by thm1118 6 years ago
- Moved public_api to src so ng-packagr is running (see https://github.com/dherges/ng-packagr/issues/589) — committed to zxing-js/ngx-scanner by werthdavid 6 years ago
- chore: Fix ng-packagr https://github.com/dherges/ng-packagr/issues/589 — committed to Tenaska/ng2-dual-list-box by mitch-b 6 years ago
- Move public_api to fix ng-packagr problem See https://github.com/ng-packagr/ng-packagr/issues/589 — committed to deja-vu-platform/deja-vu by mcslao 6 years ago
I don’t get the error once I move
public_api.tsinto thesrcdirectory. I’m not sure why the location matters, but it works for me.@NeoLSN and others if you still have the issues.
I give another shot at moving again the
public_api.tsinto thesrc/folder and it now works. The reason of why it wasn’t working before is quite silly from my side, I had forgot to update the pointer of theexportwithin thepublic_api.tssince the folder structure changed.Just to resume the steps, I did the following:
public_api.tsintosrc/folderentryFileinng-package.jsonlike so"entryFile": "src/public_api.ts"public_api.tsAlso note that after doing this changes, not only did it fixed the errors, the build runs much faster than before.
Same problem here with 2.0.0 as well.
I also get some of these errors, with version
2.2.0, but it still finishes the build and my package still end up working, so I didn’t care much.However I tried the quick fix mentioned in the comments by moving the
public_api.tsfile into the./srcfolder and I get other kind of errors and the build just stops. So it doesn’t look like this quick fix is good for all, am I the only one with that supposedly fix that doesn’t work?@iamthechad I moved
public_api.tstosrcdirectory as well and the error is gone. Very strange.