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

EISDIR: illegal operation on a directory, read #9

Closed
ehmicky opened this issue Jun 18, 2020 · 6 comments
Closed

EISDIR: illegal operation on a directory, read #9

ehmicky opened this issue Jun 18, 2020 · 6 comments

Comments

@ehmicky
Copy link
Contributor

ehmicky commented Jun 18, 2020

When a publish directory contains directories ending with *.html, the following error happens:

Inlining sources failed.
EISDIR: illegal operation on a directory, read 
    fs.js:524:3 Object.readSync
    fs.js:349:20 tryReadSync
    fs.js:386:19 Object.readFileSync
    /opt/buildhome/.netlify-build-plugins/node_modules/inline-source/lib/load.js:19:41 
    /opt/buildhome/.netlify-build-plugins/node_modules/inline-source/lib/load.js:12:10 load
    /opt/buildhome/.netlify-build-plugins/node_modules/inline-source/lib/run.js:17:17 
    /opt/buildhome/.netlify-build-plugins/node_modules/inline-source/lib/run.js:14:13 run
    /opt/buildhome/.netlify-build-plugins/node_modules/inline-source/index.js:44:15 
@Tom-Bonnike
Copy link
Owner

Tom-Bonnike commented Jun 19, 2020

Is the repo public by any chance?

I think it’s the same issue as: #5.
It’s not because we’re running inline-source on a directory that ends with .html (by default readdirp only returns files), it’s because the user has an inline attribute on a tag that points to a directory instead of a file :/

If that’s the case, the build failing is expected since it’s an user error.

@ehmicky

This comment has been minimized.

@Tom-Bonnike

This comment has been minimized.

@ehmicky
Copy link
Contributor Author

ehmicky commented Jun 19, 2020

Oops, sorry.

Those are the deploy logs for this plugin:

9:23:01 PM: Build ready to start
9:23:03 PM: build-image version: 342853e31ef590be8195dfbea64bbc4657de7b6b
9:23:03 PM: build-image tag: v3.3.16
9:23:03 PM: buildbot version: 0ffb969a1fc5a7aa9d2a93dd77dd40a990576807
9:23:04 PM: Fetching cached dependencies
9:23:04 PM: Starting to download cache of 254.3KB
9:23:04 PM: Finished downloading cache in 82.258607ms
9:23:04 PM: Starting to extract cache
9:23:04 PM: Failed to fetch cache, continuing with build
9:23:04 PM: Starting to prepare the repo for build
9:23:04 PM: No cached dependencies found. Cloning fresh repo
9:23:04 PM: git clone https://github.com/namzo/ernestojeh-v2
9:23:10 PM: Preparing Git Reference refs/heads/master
9:23:12 PM: Starting build script
9:23:12 PM: Installing dependencies
9:23:12 PM: Python version set to 2.7
9:23:13 PM: Downloading and installing node v10.21.0...
9:23:14 PM: Downloading https://nodejs.org/dist/v10.21.0/node-v10.21.0-linux-x64.tar.xz...
9:23:14 PM: Computing checksum with sha256sum
9:23:14 PM: Checksums matched!
9:23:17 PM: Now using node v10.21.0 (npm v6.14.4)
9:23:17 PM: Started restoring cached build plugins
9:23:17 PM: Finished restoring cached build plugins
9:23:17 PM: Attempting ruby version 2.6.2, read from environment
9:23:18 PM: 
9:23:18 PM: ** WARNING **
9:23:18 PM: Using custom ruby version 2.6.2, this will slow down the build.
9:23:18 PM: To ensure fast builds, set the RUBY_VERSION environment variable, or .ruby-version file, to an included ruby version.
9:23:18 PM: Included versions: 2.7.1
9:23:18 PM: 
9:23:18 PM: Required ruby-2.6.2 is not installed - installing.
9:23:19 PM: Searching for binary rubies, this might take some time.
9:23:19 PM: Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/16.04/x86_64/ruby-2.6.2.tar.bz2
9:23:19 PM: Checking requirements for ubuntu.
9:23:20 PM: Requirements installation successful.
9:23:20 PM: ruby-2.6.2 - #configure
9:23:20 PM: ruby-2.6.2 - #download
9:23:21 PM: No checksum for downloaded archive, recording checksum in user configuration.
9:23:21 PM: ruby-2.6.2 - #validate archive
9:23:26 PM: ruby-2.6.2 - #extract
9:23:30 PM: ruby-2.6.2 - #validate binary
9:23:30 PM: ruby-2.6.2 - #setup
9:23:31 PM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2@global
9:23:31 PM: ruby-2.6.2 - #importing gemset /opt/buildhome/.rvm/gemsets/global.gems........................................
9:23:32 PM: ruby-2.6.2 - #generating global wrappers.......
9:23:32 PM: ruby-2.6.2 - #gemset created /opt/buildhome/.rvm/gems/ruby-2.6.2
9:23:32 PM: ruby-2.6.2 - #importing gemsetfile /opt/buildhome/.rvm/gemsets/default.gems evaluated to empty gem list
9:23:32 PM: ruby-2.6.2 - #generating default wrappers.......
9:23:33 PM: Using /opt/buildhome/.rvm/gems/ruby-2.6.2
9:23:33 PM: Using ruby version 2.6.2
9:23:33 PM: Using bundler version 2.1.4 from Gemfile.lock
9:23:35 PM: Successfully installed bundler-2.1.4
9:23:35 PM: 1 gem installed
9:23:35 PM: Using PHP version 5.6
9:23:35 PM: Started restoring cached ruby gems
9:23:35 PM: Finished restoring cached ruby gems
9:23:35 PM: Installing gem bundle
9:23:35 PM: [DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path '/opt/build/cache/bundle'`, and stop using this flag
9:23:35 PM: [DEPRECATED] The --binstubs option will be removed in favor of `bundle binstubs`
9:23:38 PM: Fetching gem metadata from https://rubygems.org/.........
9:23:38 PM: Fetching public_suffix 4.0.5
9:23:38 PM: Installing public_suffix 4.0.5
9:23:38 PM: Fetching addressable 2.7.0
9:23:38 PM: Installing addressable 2.7.0
9:23:39 PM: Fetching execjs 2.7.0
9:23:39 PM: Installing execjs 2.7.0
9:23:39 PM: Fetching autoprefixer-rails 9.7.6
9:23:39 PM: Installing autoprefixer-rails 9.7.6
9:23:39 PM: Using bundler 2.1.4
9:23:39 PM: Fetching colorator 1.1.0
9:23:39 PM: Installing colorator 1.1.0
9:23:39 PM: Fetching concurrent-ruby 1.1.6
9:23:39 PM: Installing concurrent-ruby 1.1.6
9:23:39 PM: Fetching eventmachine 1.2.7
9:23:39 PM: Installing eventmachine 1.2.7 with native extensions
9:24:00 PM: Fetching http_parser.rb 0.6.0
9:24:00 PM: Installing http_parser.rb 0.6.0 with native extensions
9:24:02 PM: Fetching em-websocket 0.5.1
9:24:02 PM: Installing em-websocket 0.5.1
9:24:02 PM: Fetching ffi 1.12.2
9:24:02 PM: Installing ffi 1.12.2 with native extensions
9:24:11 PM: Fetching forwardable-extended 2.6.0
9:24:11 PM: Installing forwardable-extended 2.6.0
9:24:11 PM: Fetching i18n 0.9.5
9:24:11 PM: Installing i18n 0.9.5
9:24:11 PM: Fetching rb-fsevent 0.10.4
9:24:11 PM: Installing rb-fsevent 0.10.4
9:24:11 PM: Fetching rb-inotify 0.10.1
9:24:11 PM: Installing rb-inotify 0.10.1
9:24:11 PM: Fetching sass-listen 4.0.0
9:24:11 PM: Installing sass-listen 4.0.0
9:24:11 PM: Fetching sass 3.7.4
9:24:11 PM: Installing sass 3.7.4
9:24:12 PM: Fetching jekyll-sass-converter 1.5.2
9:24:12 PM: Installing jekyll-sass-converter 1.5.2
9:24:12 PM: Fetching listen 3.2.1
9:24:12 PM: Installing listen 3.2.1
9:24:12 PM: Fetching jekyll-watch 2.2.1
9:24:12 PM: Installing jekyll-watch 2.2.1
9:24:12 PM: Fetching kramdown 1.17.0
9:24:12 PM: Installing kramdown 1.17.0
9:24:12 PM: Fetching liquid 4.0.3
9:24:13 PM: Installing liquid 4.0.3
9:24:13 PM: Fetching mercenary 0.3.6
9:24:13 PM: Installing mercenary 0.3.6
9:24:13 PM: Fetching pathutil 0.16.2
9:24:13 PM: Installing pathutil 0.16.2
9:24:13 PM: Fetching rouge 3.19.0
9:24:13 PM: Installing rouge 3.19.0
9:24:13 PM: Fetching safe_yaml 1.0.5
9:24:13 PM: Installing safe_yaml 1.0.5
9:24:13 PM: Fetching jekyll 3.8.7
9:24:14 PM: Installing jekyll 3.8.7
9:24:14 PM: Fetching jekyll-autoprefixer 1.0.2
9:24:14 PM: Installing jekyll-autoprefixer 1.0.2
9:24:14 PM: Fetching jekyll-feed 0.13.0
9:24:14 PM: Installing jekyll-feed 0.13.0
9:24:14 PM: Fetching jekyll-paginate-v2 3.0.0
9:24:14 PM: Installing jekyll-paginate-v2 3.0.0
9:24:14 PM: Fetching jekyll-postcss 0.4.0
9:24:14 PM: Installing jekyll-postcss 0.4.0
9:24:14 PM: Fetching jekyll-purgecss 0.3.0
9:24:14 PM: Installing jekyll-purgecss 0.3.0
9:24:14 PM: Fetching jekyll-redirect-from 0.16.0
9:24:14 PM: Installing jekyll-redirect-from 0.16.0
9:24:14 PM: Fetching jekyll-sitemap 1.4.0
9:24:14 PM: Installing jekyll-sitemap 1.4.0
9:24:15 PM: Bundle complete! 9 Gemfile dependencies, 34 gems now installed.
9:24:15 PM: Bundled gems are installed into `/opt/build/cache/bundle`
9:24:15 PM: Post-install message from sass:
9:24:15 PM: Ruby Sass has reached end-of-life and should no longer be used.
9:24:15 PM: * If you use Sass as a command-line tool, we recommend using Dart Sass, the new
9:24:15 PM:   primary implementation: https://sass-lang.com/install
9:24:15 PM: * If you use Sass as a plug-in for a Ruby web framework, we recommend using the
9:24:15 PM:   sassc gem: https://github.com/sass/sassc-ruby#readme
9:24:15 PM: * For more details, please refer to the Sass blog:
9:24:15 PM:   https://sass-lang.com/blog/posts/7828841
9:24:15 PM: Gem bundle installed
9:24:15 PM: 5.2 is already installed.
9:24:15 PM: Using Swift version 5.2
9:24:15 PM: Started restoring cached node modules
9:24:15 PM: Finished restoring cached node modules
9:24:15 PM: Installing NPM modules using NPM version 6.14.4
9:24:19 PM: npm WARN repo No repository field.
9:24:19 PM: npm WARN repo No license field.
9:24:19 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
9:24:19 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
9:24:19 PM: added 201 packages from 144 contributors and audited 202 packages in 3.47s
9:24:19 PM: 11 packages are looking for funding
9:24:19 PM:   run `npm fund` for details
9:24:19 PM: found 1 low severity vulnerability
9:24:19 PM:   run `npm audit fix` to fix them, or `npm audit` for details
9:24:19 PM: NPM modules installed
9:24:20 PM: Started restoring cached go cache
9:24:20 PM: Finished restoring cached go cache
9:24:20 PM: Installing Go version 1.12
9:24:26 PM: unset GOOS;
9:24:26 PM: unset GOARCH;
9:24:26 PM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64';
9:24:26 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64/bin:${PATH}";
9:24:26 PM: go version >&2;
9:24:26 PM: export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.12.linux.amd64.env"
9:24:26 PM: go version go1.12 linux/amd64
9:24:26 PM: Installing missing commands
9:24:26 PM: Verify run directory
9:24:27 PM: ​
9:24:27 PM: ┌─────────────────────────────┐
9:24:27 PM: │        Netlify Build        │
9:24:27 PM: └─────────────────────────────┘
9:24:27 PM: ​
9:24:27 PM: ❯ Version
9:24:27 PM:   @netlify/build 2.0.10
9:24:27 PM: ​
9:24:27 PM: ❯ Flags
9:24:27 PM:   deployId: 5eea6d950a2db601978e3e24
9:24:27 PM:   mode: buildbot
9:24:27 PM: ​
9:24:27 PM: ❯ Current directory
9:24:27 PM:   /opt/build/repo
9:24:27 PM: ​
9:24:27 PM: ❯ Config file
9:24:27 PM:   /opt/build/repo/netlify.toml
9:24:27 PM: ​
9:24:27 PM: ❯ Context
9:24:27 PM:   production
9:24:27 PM: ​
9:24:27 PM: ❯ Loading plugins
9:24:27 PM:    - netlify-plugin-inline-source@1.0.4 from Netlify app
9:24:27 PM:    - netlify-plugin-minify-html@0.2.3 from netlify.toml and package.json
9:24:29 PM: ​
9:24:29 PM: ┌────────────────────────────────────┐
9:24:29 PM: │ 1. build.command from netlify.toml │
9:24:29 PM: └────────────────────────────────────┘
9:24:29 PM: ​
9:24:29 PM: $ jekyll build
9:24:29 PM: Configuration file: /opt/build/repo/_config.yml
9:24:29 PM:             Source: /opt/build/repo
9:24:29 PM:        Destination: /opt/build/repo/_site
9:24:29 PM:  Incremental build: disabled. Enable with --incremental
9:24:29 PM:       Generating...
9:24:30 PM:        Jekyll Feed: Generating feed for posts
9:24:30 PM:          AutoPages: Disabled/Not configured in site.config.
9:24:30 PM:         Pagination: Complete, processed 2 pagination page(s)
9:24:40 PM:                     done in 10.843 seconds.
9:24:40 PM:  Auto-regeneration: disabled. Use --watch to enable.
9:24:40 PM: ​
9:24:40 PM: (build.command completed in 11.7s)
9:24:40 PM: ​
9:24:40 PM: ┌──────────────────────────────────────────────────────────┐
9:24:40 PM: │ 2. onPostBuild command from netlify-plugin-inline-source │
9:24:40 PM: └──────────────────────────────────────────────────────────┘
9:24:40 PM: ​
9:24:41 PM: ​
9:24:41 PM: ┌──────────────────────────────────────────────┐
9:24:41 PM: │ Plugin "netlify-plugin-inline-source" failed │
9:24:41 PM: └──────────────────────────────────────────────┘
9:24:41 PM: ​
9:24:41 PM:   Error message
9:24:41 PM:   Error: Inlining sources failed.
9:24:41 PM:   EISDIR: illegal operation on a directory, read
9:24:41 PM: ​
9:24:41 PM:   Plugin details
9:24:41 PM:   Package:        netlify-plugin-inline-source
9:24:41 PM:   Version:        1.0.4
9:24:41 PM:   Repository:     git+https://github.com/Tom-Bonnike/netlify-plugin-inline-source.git
9:24:41 PM:   npm link:       https://www.npmjs.com/package/netlify-plugin-inline-source
9:24:41 PM:   Report issues:  https://github.com/Tom-Bonnike/netlify-plugin-inline-source/issues
9:24:41 PM: ​
9:24:41 PM:   Error location
9:24:41 PM:   In "onPostBuild" event in "netlify-plugin-inline-source" from Netlify app
9:24:41 PM:       at /opt/buildhome/.netlify-build-plugins/node_modules/inline-source/lib/load.js:19:41
9:24:41 PM:       at load (/opt/buildhome/.netlify-build-plugins/node_modules/inline-source/lib/load.js:12:10)
9:24:41 PM:       at /opt/buildhome/.netlify-build-plugins/node_modules/inline-source/lib/run.js:17:17
9:24:41 PM:       at run (/opt/buildhome/.netlify-build-plugins/node_modules/inline-source/lib/run.js:14:13)
9:24:41 PM:       at /opt/buildhome/.netlify-build-plugins/node_modules/inline-source/index.js:44:15
9:24:41 PM: ​
9:24:41 PM:   Resolved config
9:24:41 PM:   build:
9:24:41 PM:     command: jekyll build
9:24:41 PM:     publish: /opt/build/repo/_site
9:24:41 PM:   plugins:
9:24:41 PM:     - inputs: {}
9:24:41 PM:       origin: ui
9:24:41 PM:       package: netlify-plugin-inline-source
9:24:41 PM:     - inputs: {}
9:24:41 PM:       origin: config
9:24:41 PM:       package: netlify-plugin-minify-html
9:24:41 PM: Caching artifacts
9:24:41 PM: Started saving ruby gems
9:24:41 PM: Finished saving ruby gems
9:24:41 PM: Started saving node modules
9:24:41 PM: Finished saving node modules
9:24:41 PM: Started saving build plugins
9:24:41 PM: Finished saving build plugins
9:24:41 PM: Started saving pip cache
9:24:41 PM: Finished saving pip cache
9:24:41 PM: Started saving emacs cask dependencies
9:24:41 PM: Finished saving emacs cask dependencies
9:24:41 PM: Started saving maven dependencies
9:24:41 PM: Finished saving maven dependencies
9:24:41 PM: Started saving boot dependencies
9:24:41 PM: Finished saving boot dependencies
9:24:41 PM: Started saving go dependencies
9:24:43 PM: Finished saving go dependencies
9:24:46 PM: Cached ruby version 2.6.2
9:24:46 PM: Error running command: Build script returned non-zero exit code: 1
9:24:46 PM: Failing build: Failed to build site
9:24:46 PM: Failed during stage 'building site': Build script returned non-zero exit code: 1
9:24:47 PM: Finished processing build request in 1m43.196219324s

Repository is here but it is private.

@Tom-Bonnike Tom-Bonnike changed the title Ignore directories ending with *.html EISDIR: illegal operation on a directory, read Jun 20, 2020
@pavelloz
Copy link

pavelloz commented Mar 1, 2022

What was the issue? Ive got the same thin happening to me :(

@Tom-Bonnike
Copy link
Owner

It’s likely you’re trying to inline an HTML tag that is pointing to a directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants