aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
161 stars 55 forks source link

sandbox no longer works properly. #1255

Closed rnrnstar2 closed 5 months ago

rnrnstar2 commented 5 months ago

Environment information

System:
  OS: macOS 14.0
  CPU: (10) arm64 Apple M2 Pro
  Memory: 150.45 MB / 16.00 GB
  Shell: /bin/zsh
Binaries:
  Node: 20.5.0 - /usr/local/bin/node
  Yarn: 1.22.19 - /usr/local/bin/yarn
  npm: 9.8.0 - /usr/local/bin/npm
  pnpm: 8.15.5 - ~/Library/pnpm/pnpm
NPM Packages:
  @aws-amplify/backend: 0.12.1
  @aws-amplify/backend-cli: 0.11.1
  aws-amplify: 6.0.25
  aws-cdk: 2.134.0
  aws-cdk-lib: 2.134.0
  typescript: 5.4.3
AWS environment variables:
  AWS_DEFAULT_PROFILE = cloudteam
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Description

Does anyone know the cause of the error below? When I installed a library using pnpm in a monorepo, an error started to occur.

$ npx amplify sandbox --debug                                                                       【 main 】
[DEBUG] 2024-04-05T02:39:21.623Z: [Sandbox] Initializing...
[DEBUG] 2024-04-05T02:39:21.630Z: [Sandbox] Executing command `deploy`
[DEBUG] 2024-04-05T02:39:22.216Z: {
    "compilerOptions": {
        "target": "es2022",
        "module": "es2022",
        "moduleResolution": "bundler",
        "resolveJsonModule": true,
        "esModuleInterop": true,
        "forceConsistentCasingInFileNames": true,
        "strict": false,
        "skipLibCheck": true,
        "allowSyntheticDefaultImports": true,
        "resolvePackageJsonExports": true,
        "resolvePackageJsonImports": true,
        "useDefineForClassFields": true
    },
    "files": [
        "./backend.ts",
        "./auth/resource.ts",
        "./data/resource.ts",
        "./functions/oripaPostConfirmation/handler.ts",
        "./functions/oripaPostConfirmation/resource.ts"
    ]
}

[DEBUG] 2024-04-05T02:39:26.253Z: sh: tsx: command not found

[DEBUG] 2024-04-05T02:39:26.259Z: 

[DEBUG] 2024-04-05T02:39:26.259Z: Subprocess exited with error 127

Error: sh: tsx: command not found
Subprocess exited with error 127

Caused By: sh: tsx: command not found
Subprocess exited with error 127
rnrnstar2 commented 5 months ago

I solved it by changing to npm.