angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.73k stars 11.98k forks source link

[error] Error: EISDIR: illegal operation on a directory, read #16858

Closed StephenFluin closed 4 years ago

StephenFluin commented 4 years ago

🐞 Bug report

Command (mark with an x)

Is this a regression?

yes, wasn't present in 8.x

Description

ng serve fails with the error:

An unhandled exception occurred: EISDIR: illegal operation on a directory, read
See "/tmp/ng-cDbmgA/angular-errors.log" for further details.

and this file contains

[error] Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (fs.js:506:3)
    at tryReadSync (fs.js:331:20)
    at Object.readFileSync (fs.js:368:19)
    at loadTsLibFiles (/usr/local/google/home/stephenfluin/workspace/test/devfest/node_modules/@ngtools/webpack/src/transformers/ast_helpers.js:131:59)
    at Object.<anonymous> (/usr/local/google/home/stephenfluin/workspace/test/devfest/node_modules/@ngtools/webpack/src/transformers/ast_helpers.js:47:20)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)
    at Module.require (internal/modules/cjs/loader.js:848:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/usr/local/google/home/stephenfluin/workspace/test/devfest/node_modules/@ngtools/webpack/src/transformers/index.js:14:10)
    at Module._compile (internal/modules/cjs/loader.js:955:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
    at Module.load (internal/modules/cjs/loader.js:811:32)
    at Function.Module._load (internal/modules/cjs/loader.js:723:14)

🔬 Minimal Reproduction

git clone git@github.com:GDGTC/devfest.git cd devfest yarn ng serve # works ng update @angular/cli@8 @angular/core@8 --force ng serve # still works ng update @angular/cli@9 @angular/core@9 --force --allow-dirty ng serve # failure

🌍 Your Environment


Angular CLI: 9.0.0
Node: 12.14.1
OS: linux x64

Angular: 9.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker
Ivy Workspace: 

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.0
@angular-devkit/build-angular     0.900.0
@angular-devkit/build-optimizer   0.900.0
@angular-devkit/build-webpack     0.900.0
@angular-devkit/core              9.0.0
@angular-devkit/schematics        9.0.0
@angular/cdk                      8.0.0-rc.1
@angular/fire                     5.2.1
@angular/material                 8.0.0-rc.1
@ngtools/webpack                  9.0.0
@schematics/angular               9.0.0
@schematics/update                0.900.0
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2

jsaguet commented 4 years ago

I am encountering the same issue with an ionic app. I've noticed that angular/cli v9-rc.13 was working fine but rc.14 then final version 9 threw me the exact same error. Let me know if you need more information

filipesilva commented 4 years ago

Heya, looking into this atm, I believe it's due to a change in https://github.com/angular/angular-cli/pull/16822.

eun-choi commented 4 years ago

Same for me. Build succeeds until version > 9.0.0-rc.14 But, build failes version 9.0.0-rc.14 and 9.0.0

filipesilva commented 4 years ago

Fix incoming in https://github.com/angular/angular-cli/pull/16859, hopefully we can cut a release with it soon.

mgechev commented 4 years ago

Fixed by https://github.com/angular/angular-cli/pull/16859 and released in v9.0.1.

angular-automatic-lock-bot[bot] commented 4 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.