aws / aws-pdk

The AWS PDK provides building blocks for common patterns together with development tools to manage and build your projects.
https://aws.github.io/aws-pdk/
Apache License 2.0
384 stars 75 forks source link

[BUG] Task "build Β» compile Β» generate" failed when executing "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.copy-gradle-wrapper" #774

Closed wascou closed 3 months ago

wascou commented 6 months ago

Describe the bug

I followed the tutorial here. Adding the monorepo to the projenrc file ends in an error.

Expected Behavior

It should work :D

Current Behavior

$ pdk build

my-project@0.0.0 build C:\Users\XXXX\dev\mlp-pdk pnpm exec projen build

πŸ‘Ύ build | pnpm exec nx run-many --target=build --output-style=stream --nx-bail

NX Running target build for 7 projects:

- myapi-typescript-react-query-hooks
- myapi-typescript-infra
- myapi-documentation-html-redoc
- myapi-typescript-runtime
- myapi-typescript-handlers
- myapi-model
- myapi

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

nx run myapi-model:build

nx run myapi:build

myapi-model: πŸ‘Ύ build Β» compile Β» generate | npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.copy-gradle-wrapper myapi-model: npm ERR! code EINVALIDTAGNAME myapi-model: npm ERR! Invalid tag name "$AWS_PDK_VERSION" of package "@aws/pdk@$AWS_PDK_VERSION": Tags may not have any characters that encodeURIComponent encodes. myapi-model: npm ERR! A complete log of this run can be found in: C:\Users\XXXX\AppData\Local\npm-cache_logs\2024-04-24T12_53_27_114Z-debug-0.log myapi-model: πŸ‘Ύ Task "build Β» compile Β» generate" failed when executing "npx --yes -p @aws/pdk@$AWS_PDK_VERSION type-safe-api.copy-gradle-wrapper" (cwd: C:\Users\XXXX\dev\mlp-pdk\packages\api\model) myapi-model: Warning: run-commands command "pnpm dlx projen build" exited with non-zero status code

β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”β€”

NX Running target build for 7 projects failed

Tasks not run because their dependencies failed or --nx-bail=true:

πŸ‘Ύ Task "build" failed when executing "pnpm exec nx run-many --target=build --output-style=stream --nx-bail" (cwd: C:\Users\XXXX\dev\mlp-pdk)  ELIFECYCLE  Command failed with exit code 1. C:\Users\XXXX\AppData\Roaming\npm\node_modules\@aws\pdk\node_modules\execa\index.js:212 throw error; ^

Error: Command failed with exit code 1: pnpm build at makeError (C:\Users\XXXX\AppData\Roaming\npm\node_modules\@aws\pdk\node_modules\execa\lib\error.js:60:11) at module.exports.sync (C:\Users\XXXX\AppData\Roaming\npm\node_modules\@aws\pdk\node_modules\execa\index.js:194:17) at module.exports.commandSync (C:\Users\XXXX\AppData\Roaming\npm\node_modules\@aws\pdk\node_modules\execa\index.js:235:15) at Object. (C:\Users\XXXX\AppData\Roaming\npm\node_modules\@aws\pdk_scripts\exec-command.js:41:11) at Module._compile (node:internal/modules/cjs/loader:1369:14) at Module._extensions..js (node:internal/modules/cjs/loader:1427:10) at Module.load (node:internal/modules/cjs/loader:1206:32) at Module._load (node:internal/modules/cjs/loader:1022:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) at node:internal/main/run_main_module:28:49 { shortMessage: 'Command failed with exit code 1: pnpm build', command: 'pnpm build', escapedCommand: 'pnpm build', exitCode: 1, signal: undefined, signalDescription: undefined, stdout: undefined, stderr: undefined, failed: true, timedOut: false, isCanceled: false, killed: false }

Node.js v20.12.0

Reproduction Steps

pdk new monorepo-ts pdk pdk build

Possible Solution

No response

Additional Information/Context

Node: v20.12.0 Windows: 11 PNPM: 9.0.5

PDK version used

9.0.5

What languages are you seeing this issue on?

Typescript

Environment details (OS name and version, etc.)

Windows 11

agdimech commented 6 months ago

Hi - Windows is not currently supported for the PDK directly unless it is being run within the windows subsystem for Linux (WSL).

agdimech commented 6 months ago

We do have a open issue to update the docs mentioning onboarding steps as per https://github.com/aws/aws-pdk/issues/664 however none of us here use windows so are still awaiting a community contribution for this :)

wascou commented 6 months ago

ok, Git bash is not enough

github-actions[bot] commented 4 months ago

This issue is now marked as stale because it hasn't seen activity for a while. Add a comment or it will be closed soon. If you wish to exclude this issue from being marked as stale, add the "backlog" label.

github-actions[bot] commented 3 months ago

Closing this issue as it hasn't seen activity for a while. Please add a comment @mentioning a maintainer to reopen. If you wish to exclude this issue from being marked as stale, add the "backlog" label.