UnhandledPromiseRejectionWarning: Unhandled promise rejection
See original GitHub issuewhen i follow the tutorial, i encounter this error
shrinkpack-demo viewhao$ shrinkpack .
(node:85988) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Command failed: npm cache ls
npm ERR! Usage: npm cache add <tarball file>
npm ERR! npm cache add <folder>
npm ERR! npm cache add <tarball url>
npm ERR! npm cache add <git url>
npm ERR! npm cache add <name>@<version>
npm ERR! npm cache clean
npm ERR! npm cache verify
(node:85988) [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.
! Please raise an issue at https://github.com/JamieMason/shrinkpack/issues
Error: ! failed to read contents of npm cache
at ChildProcess.onClose (/usr/local/lib/node_modules/shrinkpack/src/analyse/read-npm-cache.js:40:25)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:897:16)
at Socket.stream.socket.on (internal/child_process.js:340:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:548:12)
my node version is v8.1.2
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
What is an unhandled promise rejection? - Stack Overflow
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...
Read more >Unhandled Promise Rejection Warning - Codecademy Forums
The unhandledRejection event is emitted whenever a promise rejection is not handled. “Rejection” is the canonical term for a promise reporting ...
Read more >What is UnhandledPromiseRejectionWarning
The Promise.reject() method returns a Promise object that is rejected with a given reason. The unhandledrejection event is sent to the global scope...
Read more >Node.js Process unhandledPromiseRejection Event
The unhandledRejection event is emitted whenever a promise rejection is not handled. NodeJS warns the console about ...
Read more >Handling those unhandled promise rejections with JS async ...
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was ......
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 Free
Top 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

Happy to help! You’re doing great job 👍
Thanks @valscion for picking this up, huge help 👍 I will close this @viewhao to be tracked by #83 (which is only a week or so away by the look of things).