question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Can't find application template hello-world-typescript - check valid values in interactive init

See original GitHub issue

After upgrading SAM CLI to version 1.50.0 from 1.47.0, sam init stopped working for nodejs16.x runtime and Hello World Example TypeScript template. We are getting the following error:

Error: Can't find application template hello-world-typescript - check valid values in interactive init

Environment: Windows 10

Can anyone please help me with this asap?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
nickadamcommented, May 18, 2022

I had the same problem in windows. I traced the cli and found the git command it’s failing on. I was able to fix it by setting git longpaths true.

git.exe clone https://github.com/aws/aws-sam-cli-app-templates aws-sam-cli-app-templates                          ─╯
Cloning into 'aws-sam-cli-app-templates'...
remote: Enumerating objects: 5500, done.
remote: Counting objects: 100% (1569/1569), done.
remote: Compressing objects: 100% (430/430), done. eceiving objects:   0% (1/5500)
remote: Total 5500 (delta 1362), reused 1193 (delta 1138), pack-reused 3931
Receiving objects: 100% (5500/5500), 21.08 MiB | 38.89 MiB/s, done.
Resolving deltas: 100% (3686/3686), done.
error: unable to create file dotnetcore3.1/cookiecutter-aws-sam-quick-start-cloudwatch-events-dotnet/{{cookiecutter.project_name}}/test/{{cookiecutter.project_name}}.Tests/{{cookiecutter.project_name}}.Tests.csproj: Filename too long
fatal: cannot create directory at 'provided.al2/graalvm/java11/cookiecutter-aws-sam-graalvm-gradle/{{cookiecutter.project_name}}/HelloWorldFunction/src/main/resources/META-INF/native-image/com.amazonaws/aws-lambda-java-core': Filename too long
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

The fix (run from elevated prompt to configure for --system)

git config --system core.longpaths true
0reactions
mndevecicommented, May 19, 2022

Thanks for confirming. I will be resolving this and leave the other one open for now. Please let us know if the recommended actions in other issue (https://github.com/aws/aws-sam-cli/issues/3781) is not resolving your problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

sam init - AWS Serverless Application Model
Initializes a serverless application with an AWS SAM template. The template provides a folder structure for your AWS Lambda functions, and is connected...
Read more >
AWS SAM - Esbuild Failed: cannot find esbuild - Stack Overflow
I had to install esbuild globally to get this working npm install -g esbuild.
Read more >
AWS SAM CLIでTypeScriptがネイティブサポートされました ...
sam init を実行して、TypeScriptのAWSクイックスタートテンプレートで ... npm Application Template: hello-world-typescript Output Directory: .
Read more >
How to Write Shell Scripts in Node with Google's zx Library
js projects. Writing Shell Scripts: the Problem. Creating a shell script — a script that's executed by a shell such as Bash or...
Read more >
Meet AWS SAM CLI: sam init - Medium
“Initialize a serverless application with a SAM template, folder structure ... Possible Values: npm, pip, bundler, cli-package, maven gradle.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found