aws-samples / aws-samples/amplify-next-template

support pnpm

Open
#47 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
236
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

when I use this template, I changed npm to pnpm, and added

```yml
- curl -fsSL https://get.pnpm.io/install.sh | sh -
- source /root/.bashrc
```

to amplify.yml's `backend.phases.build.command`

but it gives error `tsx: command not found`:

```
024-06-09T14:18:56.442Z [INFO]: # Executing command: npx ampx pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID

105

2024-06-09T14:19:04.531Z [INFO]:

106

2024-06-09T14:19:09.712Z [INFO]:

107

2024-06-09T14:19:09.718Z [INFO]: UnknownFault: Error: sh: line 1: tsx: command not found

108

Subprocess exited with error 127

109

Cause: sh: line 1: tsx: command not found

110

Subprocess exited with error 127

111

2024-06-09T14:19:09.718Z [WARNING]: ampx pipeline-deploy

112

Command to deploy backends in a custom CI/CD pipeline. This command is not inten

113

ded to be used locally.

114

Options:

115

--debug Print debug logs to the console [boolean] [default: false]

116

--help Show help [boolean]

117

--branch Name of the git branch being deployed [string] [required]

118

--app-id The app id of the target Amplify app [string] [required]

119

--outputs-out-dir A path to directory where amplify_outputs is written. If no

120

t provided defaults to current process working directory.

121

[string]

122

--outputs-version Version of the configuration. Version 0 represents classic

123

amplify-cli config file amplify-configuration and 1 represe

124

nts newer config file amplify_outputs

125

[string] [choices: "0", "1"] [default: "1"]

126

2024-06-09T14:19:09.719Z [INFO]: UnknownFault: Error: sh: line 1: tsx: command not found

127

Subprocess exited with error 127

128

2024-06-09T14:19:09.719Z [INFO]: Cause: sh: line 1: tsx: command not found

129

Subprocess exited with error 127

130

2024-06-09T14:19:09.821Z [ERROR]: !!! Build failed

131

2024-06-09T14:19:09.821Z [INFO]: Please read more about Amplify Hosting's support for SSR frameworks to find if your build failure is related to an unsupported feature: https://docs.aws.amazon.com/amplify/latest/userguide/amplify-ssr-framework-support.html. You may also find this troubleshooting guide useful: https://docs.aws.amazon.com/amplify/latest/userguide/troubleshooting-ssr-deployment.html

132

2024-06-09T14:19:09.822Z [ERROR]: !!! Error: Command failed with exit code 1
```

Maybe can add support for pnpm and yarn as well?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.