digitalocean / digitalocean/doctl
Deployment failure: `sh: 1: tsc: Permission denied`
- Dominant language
- Go
- Stars
- 3.4k
- Forks
- 496
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 31
Description
**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
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 fdec25bc
- OS: Windows 10 22H2
- Installation method: winget
Contributor guide
Assessment
This issue has not been assessed yet.