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 Error when installing the package #494

Closed
adwinang opened this issue Jul 3, 2021 · 4 comments
Closed

EISDIR Error when installing the package #494

adwinang opened this issue Jul 3, 2021 · 4 comments
Labels
bug Needs More Information released Pull Request released | Issue is fixed

Comments

@adwinang
Copy link

adwinang commented Jul 3, 2021

Versions

  • NodeJS: v16.4.1
  • yarn : 1.22.10
  • mongodb-memory-server-*: 7.0.0
  • mongodb(the binary version): NA
  • system: Windows and Ubuntu (WSL)

package: mongo-memory-server

What is the Problem?

When I attempt to install the package, I am getting EISDIR error. I am unsure how to resolve this.
I am attempting to install the package in a lerna repository for a package called server-js.

Code Example

Output from Ubuntu wsl

adwinang@DESKTOP-LAUCEA1:~/work/Eight-Tones/packages/server-js$ yarn add -D mongodb-memory-server
yarn add v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.2.1: The platform "linux" is incompatible with this module.
info "fsevents@2.2.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "workspace-aggregator-44e1f310-f27c-4570-9bb9-1afa6035a4bb > lerna > @lerna/version > @lerna/github-client > @octokit/rest > @octokit/plugin-request-log@1.0.2" has unmet peer dependency "@octokit/core@>=3".
[4/4] Building fresh packages...
error /home/adwinang/work/Eight-Tones/node_modules/mongodb-memory-server: Command failed.
Exit code: 1
Command: node ./postinstall.js
Arguments:
Directory: /home/adwinang/work/Eight-Tones/node_modules/mongodb-memory-server
Output:
node:internal/fs/utils:343
    throw err;
    ^

Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (node:fs:720:3)
    at tryReadSync (node:fs:430:20)
    at Object.readFileSync (node:fs:476:19)
    at Object.next (/home/adwinang/work/Eight-Tones/node_modules/find-package-json/index.js:77:51)
    at findPackageJson (/home/adwinang/work/Eight-Tones/node_modules/mongodb-memory-server-core/lib/util/resolveConfig.js:53:16)
    at Object.<anonymous> (/home/adwinang/work/Eight-Tones/node_modules/mongodb-memory-server-core/lib/util/resolveConfig.js:114:1)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12) {
  errno: -21,
  syscall: 'read',
  code: 'EISDIR'
}

Do you know why it happenes?

no

@adwinang adwinang added the bug label Jul 3, 2021
@adwinang adwinang changed the title EISDIR Error when install the package EISDIR Error when installing the package Jul 3, 2021
@hasezoey
Copy link
Collaborator

hasezoey commented Jul 3, 2021

mongodb-memory-server-*: Latest

latest is not an version, please provide actual number

system: Windows and Ubuntu

are you sure it happens on both systems?


please provide debug output, MONGOMS_DEBUG=1 yarn install (or replace it with your command)

otherwise i dont know what path (or actual code) is triggering this

@adwinang
Copy link
Author

adwinang commented Jul 3, 2021

I have update the mongodb-memory-server version, and specified what I meant by Ubuntu which is on Ubuntu WSL.

And yes, it happened on both system for me. Even when I yarn cache clean and re-clone the project.

I ran the following with MONGOMS_DEBUG=1 yarn add mongodb-memory-server

adwinang@DESKTOP-LAUCEA1:~/work/Eight-Tones/packages/server-js$ MONGOMS_DEBUG=1 yarn add mongodb-memory-server
yarn add v1.22.10
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@2.2.1: The platform "linux" is incompatible with this module.
info "fsevents@2.2.1" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@2.3.2: The platform "linux" is incompatible with this module.
info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > client@0.1.0" has unmet peer dependency "react@*".
warning " > client@0.1.0" has unmet peer dependency "react-dom@*".
warning "workspace-aggregator-62de81c8-715c-4ebb-9955-ea8de23011df > client > @testing-library/user-event@12.5.0" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning "workspace-aggregator-62de81c8-715c-4ebb-9955-ea8de23011df > client > check-prop-types@1.1.2" has incorrect peer dependency "prop-types@<=15.6.0".
warning "workspace-aggregator-62de81c8-715c-4ebb-9955-ea8de23011df > client > rollup-plugin-peer-deps-external@2.2.0" has incorrect peer dependency "rollup@^0.x".
warning "workspace-aggregator-62de81c8-715c-4ebb-9955-ea8de23011df > client > react-scripts > @typescript-eslint/eslint-plugin > tsutils@3.17.1" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning "workspace-aggregator-62de81c8-715c-4ebb-9955-ea8de23011df > lerna > @lerna/version > @lerna/github-client > @octokit/rest > @octokit/plugin-request-log@1.0.2" has unmet peer dependency "@octokit/core@>=3".
[4/4] Building fresh packages...
[-/8] ⢀ waiting...
[-/8] ⢀ waiting...
[-/8] ⢀ waiting...
[-/8] ⢀ waiting...
error /home/adwinang/work/Eight-Tones/node_modules/mongodb-memory-server: Command failed.
Exit code: 1
Command: node ./postinstall.js
Arguments:
Directory: /home/adwinang/work/Eight-Tones/node_modules/mongodb-memory-server
Output:
2021-07-03T14:46:44.727Z MongoMS:ResolveConfig findPackageJson: Found package.json at "/home/adwinang/work/Eight-Tones/node_modules/mongodb-memory-server/package.json"
node:internal/fs/utils:343
    throw err;
    ^

Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (node:fs:720:3)
    at tryReadSync (node:fs:430:20)
    at Object.readFileSync (node:fs:476:19)
    at Object.next (/home/adwinang/work/Eight-Tones/node_modules/find-package-json/index.js:77:51)
    at findPackageJson (/home/adwinang/work/Eight-Tones/node_modules/mongodb-memory-server-core/lib/util/resolveConfig.js:53:16)
    at Object.<anonymous> (/home/adwinang/work/Eight-Tones/node_modules/mongodb-memory-server-core/lib/util/resolveConfig.js:114:1)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12) {
  errno: -21,`

@hasezoey
Copy link
Collaborator

hasezoey commented Jul 3, 2021

the only thing this could be triggered by, is when you have an package.json, which is not an file but an directory, in /home/adwinang/work/Eight-Tones/node_module or higher

anyway, i made an issue to replace that package at some point in time #495

@github-actions
Copy link

github-actions bot commented Jul 5, 2021

@github-actions github-actions bot added the released Pull Request released | Issue is fixed label Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs More Information released Pull Request released | Issue is fixed
Projects
None yet
Development

No branches or pull requests

2 participants