添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

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

Before opening, please confirm:

  • I have checked to see if my question is addressed in the FAQ .
  • I have searched for duplicate or closed issues .
  • I have read the guide for submitting bug reports .
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
  • App Id

    d39mjfc3kkuapk

    AWS Region

    eu-central-1

    Amplify Hosting feature

    Deployments

    Describe the bug

    I have an existing amplify app for my dev backend. That env works fine.

    If I add a new 'test' amplify env using amplify env add. I cannot deploy it because it fails with the error:
    Packaging lambda function failed with the error
    Command failed with exit code 127: npm run-script amplify:testHostingFn
    sh: tsc: command not found
    > [email protected] amplify:testHostingFn
    > cd amplify/backend/function/testHostingFn && tsc -p ./tsconfig.json && cd -

    Expected behavior

    The new test environment should be deployed

    Reproduction steps

    created next app -ts

    created repo on code commit

    pushed to code commit

    initiated amplify

    connected branch to amplify hosting

    added amplify REST api & lambda express function

    amplify push the BE

    created app.ts & ts config etc according to https://docs.amplify.aws/cli/function/build-options/

    amplify push

    git commit and push - to kick off CICD

    error during FE build cos of express already being declared as block scoped variable.

  • fix: exclude 'amplify' on main tsConfig.json
  • git commit and push - to kick off CICD
    *** ALL Good up to now. env is deployed! ***

    create test env following the insturctions: https://docs.amplify.aws/cli/teams/overview/#continuous-deployment-and-hosting

  • amplify add env -> test
  • amplify push
  • create git test branch and push
  • create hosting for test branch in amplify console.
    Build fails: error:
    Packaging lambda function failed with the error
    Command failed with exit code 127: npm run-script amplify:testHostingFn
    sh: tsc: command not found

    [email protected] amplify:testHostingFn
    cd amplify/backend/function/testHostingFn && tsc -p ./tsconfig.json && cd -

    Build Settings

    No response

    Log output

    # Put your logs below this line
              

    ⚠️COMMENT VISIBILITY WARNING⚠️

    Comments on closed issues are hard for our team to see.
    If you need more assistance, please either tag a team member or open a new issue that references this one.
    If you wish to keep having a conversation with other community members under this issue feel free to do so.