Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting EISDIR: illegal operation on a directory when migrating from 8.x to 9.0 #18434

Closed
paustint opened this issue Feb 7, 2020 · 8 comments · Fixed by #18454, lingounet/testage#9, hrueger/AGLight#112 or hrueger/AGLight#114
Assignees
Labels
P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@paustint
Copy link

paustint commented Feb 7, 2020

Reproduction

Steps to reproduce:

  1. ng update @angular/cdk

Because there is not enough information provided by the migration, I am unable to provide a reproduction stackblitz.

Expected Behavior

Successful migration to v9, or at least a meaningful error message that tells me where something might be wrong.

Actual Behavior

What behavior did you actually see?

EISDIR: illegal operation on a directory, read
✖ Migration failed. See above for further details.

Any help is much appreciated🙏

Environment

  • Angular: 9
  • CDK/Material: 8.2.1 -> 9.0.0
  • Browser(s): N/A
  • Operating System (e.g. Windows, macOS, Ubuntu): OSX

The error seemed similar to this issue angular/angular#31056, but all the examples in that repo shows that additional error information

$ ng update @angular/cdk --verbose
Locating potential npmrc files:
Trying '/usr/local/etc/npmrc'...not found.
Trying '/Users/foo/.npmrc'...found.
Trying '/Users/.npmrc'...not found.
Trying '/Users/foo/.npmrc'...found.
Trying '/Users/foo/dev/.npmrc'...not found.
Trying '/Users/foo/dev/node/.npmrc'...not found.
Trying '/Users/foo/dev/node/fusekit/.npmrc'...found.
Using package manager: 'npm'
Collecting installed dependencies...
Found 186 dependencies.
Fetching dependency metadata from registry...
    Locating potential npmrc files:
    Trying '/usr/local/etc/npmrc'...not found.
    Trying '/Users/foo/.npmrc'...found.
    Trying '/Users/.npmrc'...not found.
    Trying '/Users/foo/.npmrc'...found.
    Trying '/Users/foo/dev/.npmrc'...not found.
    Trying '/Users/foo/dev/node/.npmrc'...not found.
    Trying '/Users/foo/dev/node/fusekit/.npmrc'...found.
    Updating package.json with dependency @angular/cdk @ "9.0.0" (was "8.2.1")...
UPDATE package.json (9582 bytes)
✔ Packages installed successfully.
** Executing migrations of package '@angular/cdk' **

❯ Updates the Angular CDK to v9
EISDIR: illegal operation on a directory, read
✖ Migration failed. See above for further details.

$ 
@jelbourn jelbourn added the P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent label Feb 7, 2020
@devversion
Copy link
Member

@paustint Thanks for the issue. I'm trying to reproduce this on my end. The illegal operation error is surprising since we don't have any directory/file reads in our ng update migrations. It could technically be also an issue caused by the CLI, or simply a directory permission issue.

I agree that it's unfortunate that there is not enough context in the error message. I wish there would be more that is printed out initially. Do you think that you would be to able to re-run the update?

There isn't a good way for getting better error messages for ng update. This is unfortunate, and I'll work with the CLI team on getting this improved. For now though, could run with the following changes made to the node_modules/@angular/cli?

  1. Go to node_modules/@angular/cli/commands/update-impl.js.
  2. Go to line 114 (which contains e.message).
  3. Replace that line with a simple throw e so that it re-throws the error with Stacktrace?

That would help a lot. Thanks!

@devversion devversion added the needs investigation A member of the team needs to do further investigation to determine the root cause label Feb 7, 2020
@paustint
Copy link
Author

paustint commented Feb 7, 2020

OK - I found out some possible useful information.

  1. When I ran the migration from the node_modules/@angular directory, the migration was successful and 0 files aside from package.json and package-lock.json were updated (which means I likely do not have anything to migrate)
  2. When I ran the migration from the project root, after making the cli change, I get the following error message:
An unhandled exception occurred: EISDIR: illegal operation on a directory, read
See "/private/var/folders/l0/wtqgh8410tj2s_vz_n6h18y00000gp/T/ng-ZKRRHi/angular-errors.log" for further details

And that log shows this:

[error] Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (fs.js:513:3)
    at tryReadSync (fs.js:338:20)
    at Object.readFileSync (fs.js:375:19)
    at ComponentResourceCollector.resolveExternalStylesheet (/Users/foo/dev/node/foo/node_modules/@angular/cdk/schematics/update-tool/component-resource-collector.js:137:38)
    at /Users/foo/dev/node/foo/node_modules/@angular/cdk/schematics/update-tool/index.js:87:50
    at Array.forEach (<anonymous>)
    at Object.runMigrationRules (/Users/foo/dev/node/foo/node_modules/@angular/cdk/schematics/update-tool/index.js:86:14)
    at runMigration (/Users/foo/dev/node/foo/node_modules/@angular/cdk/schematics/ng-update/upgrade-rules/index.js:77:46)
    at /Users/foo/dev/node/foo/node_modules/@angular/cdk/schematics/ng-update/upgrade-rules/index.js:80:37
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/foo/dev/node/foo/node_modules/@angular/cdk/schematics/ng-update/upgrade-rules/index.js:80:24)
    at Generator.next (<anonymous>)
    at /Users/foo/dev/node/foo/node_modules/@angular/cdk/schematics/ng-update/upgrade-rules/index.js:14:71
    at new Promise (<anonymous>)
    at __awaiter (/Users/foo/dev/node/foo/node_modules/@angular/cdk/schematics/ng-update/upgrade-rules/index.js:10:12)
    at /Users/foo/dev/node/foo/node_modules/@angular/cdk/schematics/ng-update/upgrade-rules/index.js:61:35

@devversion
Copy link
Member

@paustint Perfect. Thanks for doing this. That helps a lot!

@devversion
Copy link
Member

devversion commented Feb 7, 2020

@paustint I just had a closer look at the stack trace. I forgot that we actually read external stylesheets in our update migrations. The error seems to be thrown because we attempt to read a directory.

Is it possible that you have a directory ending with .css or .scss in your project?

@paustint
Copy link
Author

paustint commented Feb 7, 2020

I don't see any folder with that naming convention, but there is one case where the styleUrls is an empty array, that is the only outlier I see.

find . -type d -name "*css*" -print | grep -v "/node_modules"

./dist/client/assets/css
./projects/foo-admin/src/scss
./src/scss
./src/assets/css

grep --include="*.component.ts" --exclude="/node_modules" -r "styleUrls: " .

styleUrls: ['./app.component.scss'],
styleUrls: ['./permissions.component.scss'],
styleUrls: ['permissions-table.component.scss'],
styleUrls: [`permissions-editor.component.scss`],
styleUrls: ['./home-card.component.scss'],
styleUrls: ['./nav.component.scss'],
styleUrls: ['./single-select-item.component.scss'],
styleUrls: [],
styleUrls: ['./date-input-filter.component.scss'],
styleUrls: [`alert-body.component.scss`],
styleUrls: ['./popover-list-item.component.scss'],
styleUrls: ['./select-multi-sobject.component.scss'],
styleUrls: ['./select-sobject.component.scss'],
styleUrls: ['./select-sobject-item.component.scss'],
styleUrls: [`card-menu.component.scss`],
styleUrls: ['./sfdc-org-selection.component.scss'],
styleUrls: ['./object-selected-table.component.scss'],
styleUrls: ['./summary-card.component.scss'],
styleUrls: ['./build-metadata-package-filter.component.scss'],
styleUrls: ['./list-metadata-table.component.scss'],
styleUrls: ['./metadata-report-filters.component.scss'],
styleUrls: ['./query-results.component.scss'],
styleUrls: ['./filter-input.component.scss'],
styleUrls: ['./filter.component.scss'],
styleUrls: ['./query-core.component.scss'],
@Component({
  selector: 'app-edit-record-dfq',
  templateUrl: './edit-record-dynamic-form.component.html',
  styleUrls: [],
})
export class EditRecordDynamicFormComponent implements OnInit, OnDestroy {

@paustint
Copy link
Author

paustint commented Feb 7, 2020

@devversion - OK - here is some more information.

I have another application in the code base with its own package.json and node_modules and it seems like the migration is operating on code OUTSIDE the angular application.

/my-application is the directory with angular.json and package.json

If I run the migration from /my-application/src then the migration runs successfully.
ng update @angular/cdk --from 8.2.1 --to 9.0.0 --migrate-only

filePath: /Users/foo/dev/node/my-application/src/app/core/home/home-card/home-card.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/shared/notification/alert-body.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/shared/sfdc-connection/sfdc-org-selection/sfdc-org-selection.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/shared/input/date-input-filter/date-input-filter.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/shared/ui/single-select-list/single-select-item/single-select-item.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/core/nav/nav.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/shared/popover-list/popover-list-item/popover-list-item.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/shared/select-sobject/select-sobject-multi/select-multi-sobject.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/shared/select-sobject/select-sobject-single/select-sobject-item/select-sobject-item.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/shared/select-sobject/select-sobject-single/select-sobject.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/misc-tools/permissions/permissions.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/misc-tools/permissions/permissions-editor/permissions-editor.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/shared/card-menu/card-menu.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/misc-tools/permissions/permissions-editor/permissions-table/permissions-table.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/query-v2/filter/filter.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/query-v2/query-core.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/query-v2/query-results/query-results.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/query-v2/filter/filter-input/filter-input.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/deployment/build-metadata-package/summary-card/summary-card.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/deployment/shared/list-metadata-table/list-metadata-table.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/deployment/build-metadata-package/object-selected-table/object-selected-table.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/deployment/build-metadata-package/build-metadata-package-filter/build-metadata-package-filter.component.scss
filePath: /Users/foo/dev/node/my-application/src/app/deployment/metadata-report/metadata-report-filters/metadata-report-filters.component.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/@fortawesome/fontawesome-svg-core/styles.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/async-limiter/coverage/lcov-report/base.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/async-limiter/coverage/lcov-report/prettify.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/dist/css/bootstrap-grid.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/dist/css/bootstrap-grid.min.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/dist/css/bootstrap-reboot.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/dist/css/bootstrap-reboot.min.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/dist/css/bootstrap.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/dist/css/bootstrap.min.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_alert.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_badge.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_breadcrumb.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_button-group.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_buttons.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_card.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_carousel.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_close.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_code.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_custom-forms.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_dropdown.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_forms.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_functions.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_grid.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_images.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_input-group.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_jumbotron.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_list-group.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_media.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_mixins.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_modal.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_nav.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_navbar.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_pagination.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_popover.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_print.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_progress.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_reboot.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_root.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_spinners.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_tables.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_toasts.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_tooltip.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_transitions.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_type.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_utilities.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/_variables.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/bootstrap-grid.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/bootstrap-reboot.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/bootstrap.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_alert.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_background-variant.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_badge.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_border-radius.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_box-shadow.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_breakpoints.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_buttons.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_caret.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_clearfix.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_deprecate.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_float.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_forms.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_gradients.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_grid-framework.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_grid.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_hover.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_image.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_list-group.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_lists.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_nav-divider.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_pagination.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_reset-text.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_resize.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_screen-reader.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_size.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_table-row.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_text-emphasis.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_text-hide.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_text-truncate.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_transition.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/mixins/_visibility.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_align.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_background.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_borders.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_clearfix.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_display.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_embed.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_flex.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_float.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_overflow.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_position.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_screenreaders.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_shadows.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_sizing.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_spacing.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_stretched-link.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_text.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/utilities/_visibility.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/bootstrap/scss/vendor/_rfs.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/eol/style.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/event-source-polyfill/tests/nodechat.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/event-source-polyfill/tests/qunit.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/gatsby-source-filesystem/node_modules/xstate/editor/src/App.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/gatsby-source-filesystem/node_modules/xstate/editor/src/index.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/http-proxy/coverage/lcov-report/base.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/http-proxy/coverage/lcov-report/prettify.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/modern-normalize/modern-normalize.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/mute-stream/coverage/lcov-report/base.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/mute-stream/coverage/lcov-report/prettify.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-gyp/node_modules/tar/coverage/lcov-report/base.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-gyp/node_modules/tar/coverage/lcov-report/prettify.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/compressed/expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/compressed/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/custom-functions/setter-expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/custom-functions/setter.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/custom-functions/string-conversion-expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/custom-functions/string-conversion.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/cwd-include-path/expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/cwd-include-path/outside.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/cwd-include-path/root/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/depth-first/_common.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/depth-first/_struct.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/depth-first/_vars.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/depth-first/a.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/depth-first/a1.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/depth-first/b.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/depth-first/b1.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/depth-first/expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/depth-first/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/follow/foo/bar/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/include-files/bar.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/include-files/chained-imports-with-custom-importer.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/include-files/expected-importer.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/include-files/file-not-processed-by-loader.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/include-files/file-processed-by-loader.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/include-files/foo.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/include-files/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/include-path/expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/include-path/functions/colorBlue.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/include-path/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/include-path/lib/vars.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/indent/expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/input-directory/sass/_skipped.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/input-directory/sass/nested/three.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/input-directory/sass/one.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/input-directory/sass/two.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/invalid/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/output-directory/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/precision/expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/precision/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/sass-path/expected-orange.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/sass-path/expected-red.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/sass-path/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/sass-path/orange/colors.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/sass-path/red/colors.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/simple/expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/simple/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/source-comments/expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/source-comments/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/source-map-embed/expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/source-map-embed/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/source-map/expected.css
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/source-map/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watcher/main/one.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watcher/main/partials/_one.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watcher/main/partials/_three.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watcher/main/partials/_two.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watcher/main/three.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watcher/main/two.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watcher/sibling/partials/_three.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watcher/sibling/three.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watching-dir-01/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watching-dir-02/foo.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watching-dir-02/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watching/index.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/node-sass/test/fixtures/watching/white.scss
filePath: /Users/foo/dev/node/my-application/landing-site/node_modules/normalize.css
An unhandled exception occurred: EISDIR: illegal operation on a directory, read
See "/private/var/folders/l0/wtqgh8410tj2s_vz_n6h18y00000gp/T/ng-I6AOPn/angular-errors.log" for further details.

@devversion
Copy link
Member

devversion commented Feb 7, 2020

Thanks @paustint for all the information. This helps a lot. I think there are a few things we could do:

  1. Make sure that we don't glob for directories matching the style extension.
  2. Do not depend on globs for finding global project stylesheets which are not part of a component.
    • We can do this by consulting the angular.json file and styles configuration.

Long-term we should explore (2) as using a glob is obviously not ideal.

devversion added a commit to devversion/material2 that referenced this issue Feb 10, 2020
…xtension

Previously, we always queried for `.css` and `.scss` files in the whole
workspace. We relied on `glob` for this, but did not disable folder
matching. Hence, it could happen that in some cases the migration rule
tried reading content from a directory (resulting in `EISDIR` error).

Additionally, we always queried for files in the actual workspace root.
This has downsides and is not correct because it could mean that
stylesheets from other projects are accidentally read (in case of a
monorepo for example).

Fixes angular#18434.
@devversion devversion added has pr and removed needs investigation A member of the team needs to do further investigation to determine the root cause labels Feb 10, 2020
mmalerba pushed a commit that referenced this issue Feb 12, 2020
Previously, we always queried for `.css` and `.scss` files in the whole
workspace. We relied on `glob` for this, but did not disable folder
matching. Hence, it could happen that in some cases the migration rule
tried reading content from a directory (resulting in `EISDIR` error).

Additionally, we always queried for files in the actual workspace root.
This has downsides and is not correct because it could mean that
stylesheets from other projects are accidentally read (in case of a
monorepo for example).

Fixes #18434.
devversion added a commit to devversion/material2 that referenced this issue Feb 19, 2020
…xtension

Previously, we always queried for `.css` and `.scss` files in the whole
workspace. We relied on `glob` for this, but did not disable folder
matching. Hence, it could happen that in some cases the migration rule
tried reading content from a directory (resulting in `EISDIR` error).

Additionally, we always queried for files in the actual workspace root.
This has downsides and is not correct because it could mean that
stylesheets from other projects are accidentally read (in case of a
monorepo for example).

Fixes angular#18434.
devversion added a commit to devversion/material2 that referenced this issue Feb 19, 2020
…xtension

Previously, we always queried for `.css` and `.scss` files in the whole
workspace. We relied on `glob` for this, but did not disable folder
matching. Hence, it could happen that in some cases the migration rule
tried reading content from a directory (resulting in `EISDIR` error).

Additionally, we always queried for files in the actual workspace root.
This has downsides and is not correct because it could mean that
stylesheets from other projects are accidentally read (in case of a
monorepo for example).

Fixes angular#18434.
mmalerba pushed a commit that referenced this issue Feb 19, 2020
Previously, we always queried for `.css` and `.scss` files in the whole
workspace. We relied on `glob` for this, but did not disable folder
matching. Hence, it could happen that in some cases the migration rule
tried reading content from a directory (resulting in `EISDIR` error).

Additionally, we always queried for files in the actual workspace root.
This has downsides and is not correct because it could mean that
stylesheets from other projects are accidentally read (in case of a
monorepo for example).

Fixes #18434.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.