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

Deployment failure: sh: 1: tsc: Permission denied #1632

Open
akbyrd opened this issue Dec 21, 2024 · 1 comment
Open

Deployment failure: sh: 1: tsc: Permission denied #1632

akbyrd opened this issue Dec 21, 2024 · 1 comment
Labels

Comments

@akbyrd
Copy link

akbyrd commented Dec 21, 2024

Describe the Issue:

When using NodeJS 18 I can reproduce a consistent failure to deploy with a brand new function.

Repro steps:

doctl serverless init test --language ts
<change runtime to nodejs:18>
doctl serverless deploy test
doctl serverless deploy test --remote-build
> build
> tsc -b

sh: 1: tsc: Permission denied

It specifically happens when building locally then building remotely. If I change my NPM build command to chmod +x node_modules/.bin/tsc && tsc -b or npm ci && tsc -b it will work properly. If I delete the node_modules folder after building locally it works again. It appears to only happen with NodeJS 18, not default/14.

My wild theory is that doctl is uploading my local node_modules folder and attempting to run that on the server. I'm on a Windows machine so the tsc script doesn't have the execute permission that Unix systems require.

Environment:

  • doctl version: 1.119.1-release fdec25b
  • OS: Windows 10 22H2
  • Installation method: winget
@akbyrd akbyrd added the bug label Dec 21, 2024
@Flet
Copy link

Flet commented Dec 28, 2024

Hey I ran into this too! (1.120.0-release via scoop)

Thanks for the clues to getting past this. Deleting node_modules directory resolved it for me.

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

No branches or pull requests

2 participants