Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Error thrown with [email protected] Error: EISDIR #1191

Closed
cowlicks opened this issue May 24, 2021 · 10 comments
Closed

Error thrown with [email protected] Error: EISDIR #1191

cowlicks opened this issue May 24, 2021 · 10 comments
Labels

Comments

@cowlicks
Copy link

This error started being thrown this morning. And only with 5.2.1. It is not thrown on 5.2.0.

pkg/prelude/bootstrap.js:1614
      throw error;
      ^

Error: EISDIR: illegal operation on a directory, read
    at error_EISDIR (pkg/prelude/bootstrap.js:553:17)
    at readFileFromSnapshot (pkg/prelude/bootstrap.js:894:33)
    at Object.readFileSync (pkg/prelude/bootstrap.js:938:18)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1095:18)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at Module.require (pkg/prelude/bootstrap.js:1593:31)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/snapshot/app/node_modules/sqlite3/lib/sqlite3-binding.js:4:15) {
  errno: -21,
  code: 'EISDIR',
  path: '/snapshot/app/node_modules/sqlite3/lib///',
  pkg: true
}
there was a problem running the executable
@jesec
Copy link
Contributor

jesec commented May 25, 2021

Which Node version do you use? Are you using compression?

If possible, can you provide a minimum repository to reproduce the issue?

@tinoks
Copy link

tinoks commented May 26, 2021

Same error when updating to 5.2.0 from 5.1.0.

pkg/prelude/bootstrap.js:1614
      ^

Error: EISDIR: illegal operation on a directory, read
    at error_EISDIR (pkg/prelude/bootstrap.js:553:17)
    at readFileFromSnapshot (pkg/prelude/bootstrap.js:894:33)
    at Object.readFileSync (pkg/prelude/bootstrap.js:938:18)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1095:18)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Function.Module._load (internal/modules/cjs/loader.js:774:14)
    at Module.require (internal/modules/cjs/loader.js:957:19)
    at Module.require (pkg/prelude/bootstrap.js:1593:31)
    at require (internal/modules/cjs/helpers.js:88:18)
    at bindings (D:\snapshot\ogcapi-fast2\node_modules\bindings\bindings.js:112:48) {
  code: 'EISDIR',
  path: 'D:\\snapshot\\ogcapi-fast2\\node_modules\\better-sqlite3\\\\\\',
  pkg: true

I am using node version v14.15.0, pkg target "node14-win-x64".

Can be reproduced with a index.js file containing:
const db = require('better-sqlite3')("test.sqlite");

@jesec
Copy link
Contributor

jesec commented May 26, 2021

Maybe related: #1192

See my comment there: #1192 (comment).

@xyklex
Copy link

xyklex commented May 28, 2021

@jesec it is happening to me too with Node 14.17.0 in Linux, I'm running the exec and placing the bindings.node in the same directory.

@xyklex
Copy link

xyklex commented May 28, 2021

Full output log

Click to expand!
{
  "error": {
    "errno": -21,
    "code": "EISDIR",
    "path": "/snapshot/tmp/node_modules/@serialport/bindings//",
    "pkg": true
  },
  "level": "error",
  "message": "uncaughtException: EISDIR: illegal operation on a directory, read\nError: EISDIR: illegal operation on a directory, read\n    at error_EISDIR (pkg/prelude/bootstrap.js:553:17)\n    at readFileFromSnapshot (pkg/prelude/bootstrap.js:894:33)\n    at Object.readFileSync (pkg/prelude/bootstrap.js:938:18)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1095:18)\n    at Module.load (internal/modules/cjs/loader.js:933:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:774:14)\n    at Module.require (internal/modules/cjs/loader.js:957:19)\n    at Module.require (pkg/prelude/bootstrap.js:1593:31)\n    at require (internal/modules/cjs/helpers.js:88:18)\n    at bindings (/snapshot/tmp/node_modules/bindings/bindings.js:112:48)\n    at Object.<anonymous> (/snapshot/tmp/node_modules/@serialport/bindings/lib/linux.js:2:36)\n    at Module._compile (pkg/prelude/bootstrap.js:1686:22)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)\n    at Module.load (internal/modules/cjs/loader.js:933:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:774:14)\n    at Module.require (internal/modules/cjs/loader.js:957:19)\n    at Module.require (pkg/prelude/bootstrap.js:1593:31)\n    at require (internal/modules/cjs/helpers.js:88:18)\n    at Object.<anonymous> (/snapshot/tmp/node_modules/@serialport/bindings/lib/index.js:14:22)\n    at Module._compile (pkg/prelude/bootstrap.js:1686:22)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)\n    at Module.load (internal/modules/cjs/loader.js:933:32)",
  "stack": "Error: EISDIR: illegal operation on a directory, read\n    at error_EISDIR (pkg/prelude/bootstrap.js:553:17)\n    at readFileFromSnapshot (pkg/prelude/bootstrap.js:894:33)\n    at Object.readFileSync (pkg/prelude/bootstrap.js:938:18)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1095:18)\n    at Module.load (internal/modules/cjs/loader.js:933:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:774:14)\n    at Module.require (internal/modules/cjs/loader.js:957:19)\n    at Module.require (pkg/prelude/bootstrap.js:1593:31)\n    at require (internal/modules/cjs/helpers.js:88:18)\n    at bindings (/snapshot/tmp/node_modules/bindings/bindings.js:112:48)\n    at Object.<anonymous> (/snapshot/tmp/node_modules/@serialport/bindings/lib/linux.js:2:36)\n    at Module._compile (pkg/prelude/bootstrap.js:1686:22)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)\n    at Module.load (internal/modules/cjs/loader.js:933:32)\n    at Function.Module._load (internal/modules/cjs/loader.js:774:14)\n    at Module.require (internal/modules/cjs/loader.js:957:19)\n    at Module.require (pkg/prelude/bootstrap.js:1593:31)\n    at require (internal/modules/cjs/helpers.js:88:18)\n    at Object.<anonymous> (/snapshot/tmp/node_modules/@serialport/bindings/lib/index.js:14:22)\n    at Module._compile (pkg/prelude/bootstrap.js:1686:22)\n    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1097:10)\n    at Module.load (internal/modules/cjs/loader.js:933:32)",
  "exception": true,
  "date": "Fri May 28 2021 15:55:41 GMT-0700 (Pacific Daylight Time)",
  "process": {
    "pid": 26706,
    "uid": 0,
    "gid": 0,
    "cwd": "/home/putty/apps",
    "execPath": "/home/putty/apps/api_app",
    "version": "v14.17.0",
    "argv": [
      "/home/putty/apps/api_app",
      "/snapshot/tmp/bin/www"
    ],
    "memoryUsage": {
      "rss": 42496000,
      "heapTotal": 18137088,
      "heapUsed": 13764700,
      "external": 1834235,
      "arrayBuffers": 254764
    }
  },
  "os": {
    "loadavg": [
      0.41,
      0.37,
      0.33
    ],
    "uptime": 191092.03
  },
  "trace": [
    {
      "column": 17,
      "file": "pkg/prelude/bootstrap.js",
      "function": "error_EISDIR",
      "line": 553,
      "method": null,
      "native": false
    },
    {
      "column": 33,
      "file": "pkg/prelude/bootstrap.js",
      "function": "readFileFromSnapshot",
      "line": 894,
      "method": null,
      "native": false
    },
    {
      "column": 18,
      "file": "pkg/prelude/bootstrap.js",
      "function": "Object.readFileSync",
      "line": 938,
      "method": "readFileSync",
      "native": false
    },
    {
      "column": 18,
      "file": "internal/modules/cjs/loader.js",
      "function": "Module._extensions..js",
      "line": 1095,
      "method": ".js",
      "native": false
    },
    {
      "column": 32,
      "file": "internal/modules/cjs/loader.js",
      "function": "Module.load",
      "line": 933,
      "method": "load",
      "native": false
    },
    {
      "column": 14,
      "file": "internal/modules/cjs/loader.js",
      "function": "Module._load",
      "line": 774,
      "method": "_load",
      "native": false
    },
    {
      "column": 19,
      "file": "internal/modules/cjs/loader.js",
      "function": "Module.require",
      "line": 957,
      "method": "require",
      "native": false
    },
    {
      "column": 31,
      "file": "pkg/prelude/bootstrap.js",
      "function": "Module.require",
      "line": 1593,
      "method": "require",
      "native": false
    },
    {
      "column": 18,
      "file": "internal/modules/cjs/helpers.js",
      "function": "require",
      "line": 88,
      "method": null,
      "native": false
    },
    {
      "column": 48,
      "file": "/snapshot/tmp/node_modules/bindings/bindings.js",
      "function": "bindings",
      "line": 112,
      "method": null,
      "native": false
    },
    {
      "column": 36,
      "file": "/snapshot/tmp/node_modules/@serialport/bindings/lib/linux.js",
      "function": null,
      "line": 2,
      "method": null,
      "native": false
    },
    {
      "column": 22,
      "file": "pkg/prelude/bootstrap.js",
      "function": "Module._compile",
      "line": 1686,
      "method": "_compile",
      "native": false
    },
    {
      "column": 10,
      "file": "internal/modules/cjs/loader.js",
      "function": "Module._extensions..js",
      "line": 1097,
      "method": ".js",
      "native": false
    },
    {
      "column": 32,
      "file": "internal/modules/cjs/loader.js",
      "function": "Module.load",
      "line": 933,
      "method": "load",
      "native": false
    },
    {
      "column": 14,
      "file": "internal/modules/cjs/loader.js",
      "function": "Module._load",
      "line": 774,
      "method": "_load",
      "native": false
    },
    {
      "column": 19,
      "file": "internal/modules/cjs/loader.js",
      "function": "Module.require",
      "line": 957,
      "method": "require",
      "native": false
    },
    {
      "column": 31,
      "file": "pkg/prelude/bootstrap.js",
      "function": "Module.require",
      "line": 1593,
      "method": "require",
      "native": false
    },
    {
      "column": 18,
      "file": "internal/modules/cjs/helpers.js",
      "function": "require",
      "line": 88,
      "method": null,
      "native": false
    },
    {
      "column": 22,
      "file": "/snapshot/tmp/node_modules/@serialport/bindings/lib/index.js",
      "function": null,
      "line": 14,
      "method": null,
      "native": false
    },
    {
      "column": 22,
      "file": "pkg/prelude/bootstrap.js",
      "function": "Module._compile",
      "line": 1686,
      "method": "_compile",
      "native": false
    },
    {
      "column": 10,
      "file": "internal/modules/cjs/loader.js",
      "function": "Module._extensions..js",
      "line": 1097,
      "method": ".js",
      "native": false
    },
    {
      "column": 32,
      "file": "internal/modules/cjs/loader.js",
      "function": "Module.load",
      "line": 933,
      "method": "load",
      "native": false
    }
  ],
  "service": "api-app",
  "machine": "violet-grand-limpet",
  "timestamp": "Fri May 28 15:55:41 -0700 2021"
}

@jesec
Copy link
Contributor

jesec commented May 31, 2021

@xyklex Can you provide a minimum repo for me to reproduce the issue?

jesec added a commit that referenced this issue May 31, 2021
…tem (#1115)"

This reverts commit 82ce625.
This reverts commit ea23196.
This reverts commit ea7d72b.

Bug: #1191, #1192
jesec added a commit that referenced this issue May 31, 2021
This reverts commit 82ce625.
This reverts commit ea23196.
This reverts commit ea7d72b.

Bug: #1191, #1192
jesec added a commit that referenced this issue May 31, 2021
This reverts commit 82ce625.
This reverts commit ea23196.
This reverts commit ea7d72b.

Bug: #1191, #1192
@xyklex
Copy link

xyklex commented May 31, 2021

@jesec as my goal was to try armv7 which last binaries updated were linuxstatic I can't confirm this now, but will test soon when I move devices to arm64.

erossignon added a commit to node-opcua/pkg that referenced this issue May 31, 2021
erossignon added a commit to node-opcua/pkg that referenced this issue May 31, 2021
erossignon added a commit to node-opcua/pkg that referenced this issue May 31, 2021
jesec pushed a commit that referenced this issue Jun 2, 2021
jesec pushed a commit that referenced this issue Jun 2, 2021
jesec pushed a commit that referenced this issue Jun 2, 2021
jesec pushed a commit that referenced this issue Jun 3, 2021
jesec pushed a commit that referenced this issue Jun 3, 2021
jesec pushed a commit that referenced this issue Jun 3, 2021
This reverts commit 52ddf23.

v2:

- #1191
- only compress VFS if --compress is set (#1192)
erossignon added a commit to node-opcua/pkg that referenced this issue Jun 3, 2021
erossignon added a commit to node-opcua/pkg that referenced this issue Jun 5, 2021
erossignon added a commit to node-opcua/pkg that referenced this issue Jun 7, 2021
erossignon added a commit to node-opcua/pkg that referenced this issue Jun 8, 2021
erossignon added a commit to node-opcua/pkg that referenced this issue Jun 8, 2021
jesec pushed a commit that referenced this issue Jun 8, 2021
)

v2:

- fix issue #1191 
- only compress VFS if --compress is set (#1192)
- improve random access with the compressed virtual file system
sebastianrath added a commit to sebastianrath/snowfs that referenced this issue Jun 18, 2021
@ngustavo
Copy link

I'm getting this same error, also version 5.2.1. It seems to happen when you are using sqlite3.

@github-actions
Copy link

This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

@github-actions github-actions bot added the Stale label Sep 21, 2021
@github-actions
Copy link

This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.

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

No branches or pull requests

5 participants