aws / aws/aws-toolkit-vscode

Windows: Unable to build SAM TypeScript project on D: drive

Open
#2,547 3 comments 0 reactions 0 assignees View on GitHub
bug platform:windows sam
Dominant language
TypeScript
Stars
2k
Forks
807
Avg merge
10h 12m
Merged PRs (30d)
7

Description

If I use a non-TypeScript template, AWS Toolkit is able to build and run my app. If I use a TypeScript template, I can build it successfully using `sam build` in PowerShell. But attempting to build a TypeScript template with AWS Toolkit gives the following error:

```
2022-03-29 08:33:03 [INFO]:
Build Failed

2022-03-29 08:33:04 [INFO]: Error: NodejsNpmEsbuildBuilder:CopyDependencies - [WinError 5] Access is denied: '.aws-sam'

2022-03-29 08:33:04 [WARN]: "sam build" failed: D:/git/myproject/template.yaml
```

**To Reproduce**

1. Run `sam init`
2. Select 1 (AWS Quick Start Templates)
3. Select 1 (Hello World Example)
4. Select N (don't use most popular runtime and package type)
5. Select nodejs14.x (currently option 8)
6. Select 1 (zip)
7. Select 2 (Hello World Example TypeScript)
8. Put in any project name.
9. Once SAM has created the project, open it in VSCode.
10. Go to the "Run and Debug" tab and open the launch configuration dropdown.
11. Select "Add configuration"
12. Choose "AWS SAM: Template-based Lambda invoke"
13. Attempt to launch the project

**Expected behavior**

The project should successfully build and launch.

**Desktop (please complete the following information):**

- OS: Windows_NT x64 10.0.19043
- Visual Studio Code Version: 1.58.1
- AWS Toolkit Version: 1.37.0

**Additional context**

Possibly related to #2511

Contributor guide

Open the contributing guide

Research direction

Start by following the listed sam init steps on Windows and launching the generated TypeScript project through the VS Code AWS SAM template-based Lambda invoke configuration. Compare the Toolkit failure with the successful sam build in PowerShell and review the possibly related issue #2511; done means the project builds and launches successfully from the Toolkit.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript, vscode
Domain
build-system, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.