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

(aws-cdk): (cdk deploy failed with Error: EACCES: permission denied, scandir ) #27610

Closed
maymayman opened this issue Oct 19, 2023 · 9 comments
Closed
Labels
@aws-cdk/aws-cloudformation Related to AWS CloudFormation bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@maymayman
Copy link

maymayman commented Oct 19, 2023

Describe the bug

I am trying to deploy CloudFormation templates using CDK
But receive an Error EACCES: permission denied, scandir

Expected Behavior

Can deploy successful

Current Behavior

node:fs:1527
  handleErrorFromBinding(ctx);
  ^


Error: EACCES: permission denied, scandir 'C:/Users/Phat/Desktop/workspace/resize-image-service/cdk.out/asset.a4d282274929658deaa9944f80a716703650e903f801727100f56ab94049e35a/nodejs/node_modules/.bin/prebuild-install'
    at Object.readdirSync (node:fs:1527:3)
    at GlobSync._readdir (\node_modules\aws-cdk\lib\index.js:431:848900)
    at GlobSync._readdirInGlobStar (\node_modules\aws-cdk\lib\index.js:431:848291)        
    at GlobSync._readdir (\node_modules\aws-cdk\lib\index.js:431:848723)
    at GlobSync._processGlobStar (\node_modules\aws-cdk\lib\index.js:431:849803)
    at GlobSync._process (\node_modules\aws-cdk\lib\index.js:431:846756)
    at GlobSync._processGlobStar (\npm\node_modules\aws-cdk\lib\index.js:431:850312)
    at GlobSync._process (\node_modules\aws-cdk\lib\index.js:431:846756)
    at GlobSync._processGlobStar (\node_modules\aws-cdk\lib\index.js:431:850312)
    at GlobSync._process (\aws-cdk\lib\index.js:431:846756) {
  errno: -4092,
  syscall: 'scandir',
  code: 'EACCES',
  path: 'Desktop/workspace/resize-image-service/cdk.out/asset.a4d282274929658deaa9944f80a716703650e903f801727100f56ab94049e35a/nodejs/node_modules/.bin/prebuild-install'
}

Reproduction Steps

cdk deploy

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.102.0

Framework Version

No response

Node.js Version

v18.18.2

OS

Window 10 Pro x64

Language

TypeScript

Language Version

typescript@4.9.5

Other information

No response

@maymayman maymayman added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Oct 19, 2023
@github-actions github-actions bot added the @aws-cdk/aws-cloudformation Related to AWS CloudFormation label Oct 19, 2023
@pahud
Copy link
Contributor

pahud commented Oct 20, 2023

Looks like it's a local OS filesystem permission issue. Unfortunately I have no idea about that off the top of my head. Does it always happen when you create a new fresh cdk project and deploy that?

@pahud pahud added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Oct 20, 2023
@github-actions
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Oct 22, 2023
@maymayman
Copy link
Author

maymayman commented Oct 27, 2023

@pahud I already resolved this issue in macOS but still have an error in Window
unlucky it always happens even though I installed CDK to global or refreshed cdk project

@github-actions github-actions bot removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. labels Oct 27, 2023
@Richardmbs12
Copy link

Same issue here since i installed the latest cdk version - 2.108 also on windows

@tharikrizan-praedico
Copy link

tharikrizan-praedico commented Nov 24, 2023

I am having the same issue

cdk version : 2.102.0

@ashishdhingra
Copy link
Contributor

ashishdhingra commented Jun 4, 2024

@maymayman I'm unsure if this is a CDK tooling issue. Could you try running command prompt in Administrator mode and try again?

@ashishdhingra ashishdhingra added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jun 4, 2024
Copy link

github-actions bot commented Jun 7, 2024

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jun 7, 2024
@adam-mah
Copy link

adam-mah commented Jul 5, 2024

Experiencing the same issue here RuntimeError: EACCES: permission denied, lstat

@Aarbel
Copy link

Aarbel commented Oct 27, 2024

same issue here, have you found a solution ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-cloudformation Related to AWS CloudFormation bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. effort/medium Medium work item – several days of effort p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

7 participants