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.

(node:7584) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, read

See original GitHub issue

After updating workspace from v11.6.0 to v12.9.0, commands like build, lint and test are not working. Getting the following error on running these commands.

Current Behavior

Version Before update : Current NX version - 11.6.0 NodeJS - 12.22.1

Current Version: Current NX version - 12.9.0 NodeJS - 12.22.1/14.17.6/14.15.5 (tried with many version) Angular Version - 12.2.0

Failure Logs

(node:7584) UnhandledPromiseRejectionWarning: Error: EISDIR: illegal operation on a directory, read at Object.readSync (fs.js:614:3) at tryReadSync (fs.js:383:20) at Object.readFileSync (fs.js:420:19) at HashingImpl.hashFile (C:\Users\anand\Workspace\UI-Workspace\node_modules@nrwl\workspace\src\core\hasher\hashing-impl.js:16:27) at C:\Users\anand\Workspace\UI-Workspace\node_modules@nrwl\workspace\src\core\hasher\hasher.js:163:51 at Array.map (<anonymous>) at C:\Users\anand\Workspace\UI-Workspace\node_modules@nrwl\workspace\src\core\hasher\hasher.js:162:26 at new Promise (<anonymous>) at Hasher.<anonymous> (C:\Users\anand\Workspace\UI-Workspace\node_modules@nrwl\workspace\src\core\hasher\hasher.js:131:41) at Generator.next (<anonymous>) (Use node --trace-warnings ... to show where the warning was created) (node:7584) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:7584) [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.

Steps to Reproduce

  • nx migrate

Environment

package.json

{ “name”: “ui-workspace”, “version”: “0.0.0”, “license”: “MIT”, “private”: true, “dependencies”: { “@angular/animations”: “12.2.0”, “@angular/cdk”: “12.2.0”, “@angular/common”: “12.2.0”, “@angular/compiler”: “12.2.0”, “@angular/core”: “12.2.0”, “@angular/forms”: “12.2.0”, “@angular/material”: “12.2.0”, “@angular/platform-browser”: “12.2.0”, “@angular/platform-browser-dynamic”: “12.2.0”, “@angular/pwa”: “0.803.9”, “@angular/router”: “12.2.0”, “@angular/service-worker”: “12.2.0”, “@google/maps”: “1.1.3”, “@nestjs/common”: “7.0.0”, “@nestjs/core”: “7.0.0”, “@nestjs/passport”: “6.1.0”, “@nestjs/platform-express”: “7.0.0”, “@nestjs/swagger”: “3.1.0”, “@ngneat/transloco”: “2.19.1”, “@ngrx/component-store”: “12.4.0”, “@ngrx/data”: “10.0.1”, “@ngrx/effects”: “12.4.0”, “@ngrx/entity”: “12.4.0”, “@ngrx/router-store”: “12.4.0”, “@ngrx/store”: “12.4.0”, “@nrwl/angular”: “12.9.0”, “angular-oauth2-oidc”: “10.0.3”, “angular-svg-round-progressbar”: “3.0.1”, “bootstrap”: “4.3.1”, “classlist.js”: “1.1.20150312”, “connect-redis”: “5.0.0”, “core-js”: “2.5.4”, “cupertino-pane”: “1.2.61”, “d3”: “5.5.0”, “express”: “4.17.1”, “express-device”: “0.4.2”, “file-saver”: “2.0.2”, “hammerjs”: “2.0.8”, “highcharts”: “7.1.3”, “highcharts-angular”: “2.4.0”, “leaflet”: “1.6.0”, “leaflet-arrowheads”: “1.1.3”, “leaflet-draw”: “1.0.4”, “leaflet-gesture-handling”: “1.1.8”, “leaflet-google-places-autocomplete”: “0.0.9”, “leaflet-rotatedmarker”: “0.2.0”, “leaflet.gridlayer.googlemutant”: “0.8.0”, “leaflet.markercluster”: “1.4.1”, “lodash-es”: “4.17.21”, “lottie-web”: “5.6.10”, “moment”: “2.24.0”, “moment-timezone”: “0.5.26”, “ng-bullet”: “1.0.3”, “ng-dynamic-component”: “5.0.0”, “ng2-nouislider”: “1.8.2”, “ngrx-store-freeze”: “0.2.4”, “ngx-infinite-scroll”: “8.0.0”, “ngx-lottie”: “6.0.0”, “ngx-permissions”: “7.0.3”, “ngx-xml2json”: “1.0.2”, “nouislider”: “14.0.2”, “passport-oauth2-refresh”: “2.0.0”, “passport-ping-oauth2”: “1.0.0”, “primeicons”: “2.0.0”, “primeng”: “9.0.6”, “raw-body”: “2.4.1”, “reflect-metadata”: “0.1.13”, “rxjs”: “6.6.3”, “swagger-ui-express”: “4.1.1”, “tslib”: “2.0.0”, “windows-iana”: “4.2.1”, “zone.js”: “0.11.4” }, “devDependencies”: { “@angular-devkit/build-angular”: “12.2.7”, “@angular-eslint/eslint-plugin”: “12.3.1”, “@angular-eslint/eslint-plugin-template”: “12.3.1”, “@angular-eslint/template-parser”: “12.3.1”, “@angular/cli”: “12.2.7”, “@angular/compiler-cli”: “12.2.0”, “@angular/language-service”: “12.2.0”, “@compodoc/compodoc”: “1.1.11”, “@nestjs/schematics”: “7.0.0”, “@nestjs/testing”: “7.0.0”, “@ngrx/schematics”: “12.4.0”, “@ngrx/store-devtools”: “12.4.0”, “@nrwl/cli”: “12.9.0”, “@nrwl/cypress”: “12.9.0”, “@nrwl/eslint-plugin-nx”: “12.9.0”, “@nrwl/jest”: “12.9.0”, “@nrwl/linter”: “12.9.0”, “@nrwl/nest”: “12.9.0”, “@nrwl/node”: “12.9.0”, “@nrwl/workspace”: “12.9.0”, “@types/applicationinsights-js”: “1.0.9”, “@types/d3”: “5.16.2”, “@types/googlemaps”: “3.37.4”, “@types/jasmine”: “3.6.4”, “@types/jasminewd2”: “2.0.8”, “@types/jest”: “26.0.8”, “@types/lodash-es”: “4.17.4”, “@types/node”: “14.14.33”, “@typescript-eslint/eslint-plugin”: “4.28.5”, “@typescript-eslint/parser”: “4.28.5”, “applicationinsights”: “1.8.6”, “async”: “3.1.0”, “axios”: “0.19.2”, “azure-storage”: “2.10.3”, “body-parser”: “1.19.0”, “chrome-launcher”: “0.13.1”, “compression”: “1.7.4”, “concurrently”: “4.1.2”, “cookie-parser”: “1.4.5”, “crypto-js”: “3.1.9-1”, “cypress”: “3.8.3”, “eslint”: “7.10.0”, “eslint-config-prettier”: “8.1.0”, “eslint-plugin-cypress”: “2.10.3”, “eslint-plugin-import”: “2.22.1”, “eslint-plugin-ngrx”: “1.31.1”, “eslint-plugin-rxjs”: “3.3.7”, “express-session”: “1.16.2”, “helmet”: “3.21.2”, “husky”: “3.0.5”, “jasmine-core”: “3.6.0”, “jasmine-spec-reporter”: “5.0.2”, “jest”: “27.0.3”, “jsonwebtoken”: “8.5.1”, “karma”: “5.0.9”, “karma-chrome-launcher”: “3.1.0”, “karma-coverage”: “2.0.3”, “karma-html-reporter”: “0.2.7”, “karma-jasmine”: “4.0.1”, “karma-jasmine-html-reporter”: “1.5.0”, “karma-spec-reporter”: “0.0.32”, “lighthouse”: “5.6.0”, “ng-packagr”: “12.2.2”, “node-rest-client”: “3.1.0”, “passport”: “0.4.0”, “passport-ping”: “0.1.1”, “prettier”: “2.3.1”, “puppeteer”: “2.1.0”, “redis”: “3.0.2”, “request”: “2.88.0”, “request-ip”: “2.1.3”, “resize-observer-polyfill”: “1.5.1”, “spdy”: “4.0.2”, “ts-jest”: “27.0.3”, “ts-node”: “9.1.1”, “tsickle”: “0.38.1”, “typescript”: “4.3.5”, “webpack-bundle-analyzer”: “3.7.0” } }

angular.json

{ “version”: 2, “cli”: { “defaultCollection”: “@nrwl/angular”, “analytics”: false }, “defaultProject”: “pitmanagement”, “generators”: { “@nrwl/angular”: { “component”: { “changeDetection”: “OnPush” }, “application”: { “linter”: “eslint” }, “library”: { “linter”: “eslint” } }, “@nrwl/angular:application”: { “style”: “scss”, “linter”: “eslint”, “unitTestRunner”: “karma”, “e2eTestRunner”: “cypress” }, “@nrwl/angular:library”: { “style”: “scss”, “linter”: “eslint”, “unitTestRunner”: “karma” }, “@nrwl/angular:component”: { “style”: “scss” } }, “projects”: {…} }

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
stixx200commented, Oct 20, 2021

I had the same issue. The problem was a implicitDependencies entry in nx.json. I have a tools directory as implicitDependency: "tools": "*". Changing this entry to "tools/*": "*" fixes this problem.

0reactions
github-actions[bot]commented, Nov 11, 2021

This issue has been automatically marked as stale because it hasn’t had any recent activity. It will be closed in 14 days if no further activity occurs. If we missed this issue please reply to keep it active. Thanks for being a part of the Nx community! 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: EISDIR: illegal operation on a directory, read · Issue #658
A bug I think. What is the current behavior? I have an project which is a react native project called th_views.rn and in...
Read more >
NPM stuck giving the same error EISDIR: Illegal operation on ...
Windows : NPM stuck giving the same error EISDIR : Illegal operation on a directory, read at error (native) [ Beautify Your Computer ......
Read more >
Error: EISDIR: illegal operation on a directory, read - Prisma 1
I've been getting this error on yarn start . Does anyone know what it relates too? Could it be related to how I...
Read more >
Error: EISDIR: illegal operation on a directory, read
I repeatedly receive this error when deploying my hosting project: Error: EISDIR: illegal operation on a directory, read.
Read more >
yarn "Error: EISDIR: illegal operation on a directory, read"
This means that yarn is trying to do something to a file but it is a directory. In your case, yarn is trying...
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