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  EISDIR: illegal operation on a directory, read #781

Closed
nkhine opened this issue May 7, 2024 · 2 comments
Closed

 EISDIR  EISDIR: illegal operation on a directory, read #781

nkhine opened this issue May 7, 2024 · 2 comments
Labels
bug Something isn't working needs-triage

Comments

@nkhine
Copy link

nkhine commented May 7, 2024

Describe the bug

I am unable to add https://github.com/awslabs/cdk-serverless-clamscan as a dependancy to my PDK project.

Running npx pdk from the root yeilds

 EISDIR  EISDIR: illegal operation on a directory, read

Expected Behavior

Package to be available

❯ npx pdk

> infra@0.0.0 default /Users/nkhine/go/src/github.com/nkhine/infra
> pnpm exec projen default

👾 default | ts-node --project tsconfig.dev.json .projenrc.ts

Current Behavior

Running npx pdk from the root of the project, I get:

> npx pdk
 EISDIR  EISDIR: illegal operation on a directory, read


/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/projen@0.79.27_constructs@10.3.0/node_modules/projen/src/task-runtime.ts:204
          throw new Error(
                ^
Error: Task "install" failed when executing "pnpm i --no-frozen-lockfile" (cwd: /Users/nkhine/go/src/github.com/nkhine/infra)
    at new RunTask (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/projen@0.79.27_constructs@10.3.0/node_modules/projen/src/task-runtime.ts:204:17)
    at TaskRuntime.runTask (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/projen@0.79.27_constructs@10.3.0/node_modules/projen/src/task-runtime.ts:76:5)
    at NodePackage.installDependencies (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/projen@0.79.27_constructs@10.3.0/node_modules/projen/src/javascript/node-package.ts:1548:13)
    at MonorepoTsProject.resolveSubNodeProjects (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/@aws+pdk@0.23.37_@aws-cdk+aws-cognito-identitypool-alpha@2.140.0-alpha.0_aws-cdk-lib@2.140.0__zqsmgdbtfwpke5us6grfruaubq/node_modules/@aws/pdk/monorepo/projects/typescript/monorepo-ts.ts:614:22)
    at MonorepoTsProject.postSynthesize (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/@aws+pdk@0.23.37_@aws-cdk+aws-cognito-identitypool-alpha@2.140.0-alpha.0_aws-cdk-lib@2.140.0__zqsmgdbtfwpke5us6grfruaubq/node_modules/@aws/pdk/monorepo/projects/typescript/monorepo-ts.ts:603:10)
    at MonorepoTsProject.synth (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/projen@0.79.27_constructs@10.3.0/node_modules/projen/src/project.ts:628:12)
    at MonorepoTsProject.synth (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/@aws+pdk@0.23.37_@aws-cdk+aws-cognito-identitypool-alpha@2.140.0-alpha.0_aws-cdk-lib@2.140.0__zqsmgdbtfwpke5us6grfruaubq/node_modules/@aws/pdk/monorepo/projects/typescript/monorepo-ts.ts:595:11)
    at Object.<anonymous> (/Users/nkhine/go/src/github.com/nkhine/infra/.projenrc.ts:84:10)
    at Module._compile (node:internal/modules/cjs/loader:1375:14)
    at Module.m._compile (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/ts-node@10.9.2_@types+node@18.19.32_typescript@5.4.5/node_modules/ts-node/src/index.ts:1618:23)
👾 Task "default" failed when executing "ts-node --project tsconfig.dev.json .projenrc.ts" (cwd: /Users/nkhine/go/src/github.com/nkhine/infra)
 ELIFECYCLE  Command failed with exit code 1.
/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/@aws+pdk@0.23.37_@aws-cdk+aws-cognito-identitypool-alpha@2.140.0-alpha.0_aws-cdk-lib@2.140.0__zqsmgdbtfwpke5us6grfruaubq/node_modules/@aws/pdk/node_modules/execa/index.js:212
		throw error;
		^

Error: Command failed with exit code 1: pnpm default
    at makeError (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/@aws+pdk@0.23.37_@aws-cdk+aws-cognito-identitypool-alpha@2.140.0-alpha.0_aws-cdk-lib@2.140.0__zqsmgdbtfwpke5us6grfruaubq/node_modules/@aws/pdk/node_modules/execa/lib/error.js:60:11)
    at module.exports.sync (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/@aws+pdk@0.23.37_@aws-cdk+aws-cognito-identitypool-alpha@2.140.0-alpha.0_aws-cdk-lib@2.140.0__zqsmgdbtfwpke5us6grfruaubq/node_modules/@aws/pdk/node_modules/execa/index.js:194:17)
    at module.exports.commandSync (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/@aws+pdk@0.23.37_@aws-cdk+aws-cognito-identitypool-alpha@2.140.0-alpha.0_aws-cdk-lib@2.140.0__zqsmgdbtfwpke5us6grfruaubq/node_modules/@aws/pdk/node_modules/execa/index.js:235:15)
    at Object.<anonymous> (/Users/nkhine/go/src/github.com/nkhine/infra/node_modules/.pnpm/@aws+pdk@0.23.37_@aws-cdk+aws-cognito-identitypool-alpha@2.140.0-alpha.0_aws-cdk-lib@2.140.0__zqsmgdbtfwpke5us6grfruaubq/node_modules/@aws/pdk/_scripts/exec-command.js:41:11)
    at Module._compile (node:internal/modules/cjs/loader:1375:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:142:12)
    at node:internal/main/run_main_module:28:49 {
  shortMessage: 'Command failed with exit code 1: pnpm default',
  command: 'pnpm default',
  escapedCommand: 'pnpm default',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Node.js v21.5.0

Reproduction Steps

const monorepo = new MonorepoTsProject({
  ...baseOptions,
  deps: [
    "@aws/pdk@0.23.37",
    "cdk-nag",
    "cdk-serverless-clamscan",
    "yaml",
    "zod@^3.22.4",
  ],
...

Possible Solution

No response

Additional Information/Context

No response

PDK version used

0.23.37

What languages are you seeing this issue on?

Typescript

Environment details (OS name and version, etc.)

❯ sw_vers ProductName: macOS ProductVersion: 14.4.1 BuildVersion: 23E224

@nkhine nkhine added bug Something isn't working needs-triage labels May 7, 2024
@agdimech
Copy link
Contributor

agdimech commented May 20, 2024

Hi,

This seems to be an issue with pnpm itself. I just tested by running the following;

pnpm init
pnpm add cdk-serverless-clamscan

Which resulted in:

Packages: +6
++++++
Progress: resolved 6, reused 6, downloaded 0, added 6, done
 EISDIR  EISDIR: illegal operation on a directory, read

I also tested this in npm and yarn without issue.

@nkhine
Copy link
Author

nkhine commented May 21, 2024

Thanks @agdimech

@nkhine nkhine closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants