Node: (node:12440) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1)

Created on 8 Sep 2017  路  10Comments  路  Source: nodejs/node

I have npm 5.4.1 and node 8.4
the following is my package.json

{
  "name": "mds-date-time-picker-sample",
  "version": "1.0.0",
  "license": "MIT",
  "author": {
    "name": "Mohammad Dayyan",
    "email": "[email protected]",
    "url": "https://github.com/Mds92"
  },
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^4.3.6",
    "@angular/cdk": "github:angular/cdk-builds",
    "@angular/common": "^4.2.4",
    "@angular/compiler": "^4.2.4",
    "@angular/core": "^4.2.4",
    "@angular/forms": "^4.2.4",
    "@angular/http": "^4.2.4",
    "@angular/material": "github:angular/material2-builds",
    "@angular/platform-browser": "^4.2.4",
    "@angular/platform-browser-dynamic": "^4.2.4",
    "@angular/router": "^4.2.4",
    "core-js": "^2.4.1",
    "hammerjs": "^2.0.8",
    "mds.angular.datetimepicker": "^1.0.40",
    "mds.persian.datetime": "^0.9.70",
    "rxjs": "^5.4.2",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "^1.3.2",
    "@angular/compiler-cli": "^4.2.4",
    "@angular/language-service": "^4.2.4",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.1.1",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.2.0",
    "tslint": "~5.3.2",
    "typescript": "~2.3.3"
  }
}

When I user npm install I get the following error:

D:\Sources\Mds92.github\MdsDateTimePickerSample>npm install
(node:12440) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, stat 'C:\Users
\Mohammad\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-880558e1\angular\cdk.es5.js'
(node:12440) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will te
rminate the Node.js process with a non-zero exit code.
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Mohammad\AppData\Roaming\npm-cache\_logs\2017-09-08T03_45_16_698Z-debug.log

What's the problem?

invalid question

Most helpful comment

Try the following solution:

https://stackoverflow.com/questions/46020018/error-eperm-operation-not-permitted-unlink-d-sources-node-modules-fseven/46113451#46113451

All 10 comments

Please run with --trace-warnings. Also, this issue probably belongs on the help repo because this is almost certainly an error from an npm lifecycle script. (As such, general help.)

Please run with --trace-warnings. Also, this issue probably belongs on the help repo because this is almost certainly an error from an npm lifecycle script. (As such, general help.)

npm install --trace-warnings Result:

(node:3996) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: ENOENT: no such file or directory, stat 'C:\Users\
Mohammad\AppData\Roaming\npm-cache\_cacache\tmp\git-clone-33986622\angular\cdk.es5.js'
(node:3996) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will ter
minate the Node.js process with a non-zero exit code.
npm ERR! cb() never called!

npm ERR! This is an error with npm itself. Please report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Mohammad\AppData\Roaming\npm-cache\_logs\2017-09-08T06_59_26_939Z-debug.log

Nothing changed

The bug is in that cdk.es5.js script. You should report it to the project where it comes from (angular?).

I'll close this out, not a node.js bug.

@bnoordhuis - I do not understand, how can this be a CDK error when npm is throwing an install promise rejection? I am experiencing the same thing here: https://github.com/npm/npm/issues/18467

I can not install flex-layout-builds too. I'm using node 8.6.0

@ThomasBurleson Sorry, I may have misread the error message but it's not a node.js issue. Try reporting it to npm.

@bnoordhuis - Ok Thx

@Mds92 is there a follow up of this issue on the npm repo? Couldn't find one. I'm facing the same problem and couldn't find a solution as yet.

Try the following solution:

https://stackoverflow.com/questions/46020018/error-eperm-operation-not-permitted-unlink-d-sources-node-modules-fseven/46113451#46113451

@Mds92 , Thanks 馃

Was this page helpful?
0 / 5 - 0 ratings