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] pdk new monorepo-ts fails with missing dependency "mustache" #621

Closed cogwirrel closed 1 year ago

cogwirrel commented 1 year ago

Describe the bug

pdk new monorepo-ts fails with a missing dependency.

Expected Behavior

pdk new monorepo-ts to succeed

Current Behavior

$ pdk new monorepo-ts
/Users/jacsteve/stuff/random/foo
└── (empty)

added 2 packages in 596ms

10 packages are looking for funding
  run `npm fund` for details
👾 installing external module @aws/pdk...

added 7 packages, and audited 272 packages in 10s

42 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Error: Cannot find module 'mustache'
Require stack:
- /Users/jacsteve/stuff/random/foo/node_modules/@aws/pdk/cloudscape-react-ts-website/cloudscape-react-ts-website-project.js
- /Users/jacsteve/stuff/random/foo/node_modules/@aws/pdk/cloudscape-react-ts-website/index.js
- /Users/jacsteve/stuff/random/foo/node_modules/@aws/pdk/index.js
- /Users/jacsteve/.npm/_npx/07946fd0f68b1c52/node_modules/projen/lib/projects.js
- /Users/jacsteve/.npm/_npx/07946fd0f68b1c52/node_modules/projen/lib/cli/cmds/new.js
- /Users/jacsteve/.npm/_npx/07946fd0f68b1c52/node_modules/projen/lib/cli/index.js
- /Users/jacsteve/.npm/_npx/07946fd0f68b1c52/node_modules/projen/bin/projen
    at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at Module.require (node:internal/modules/cjs/loader:1143:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/Users/jacsteve/stuff/random/foo/node_modules/@aws/pdk/cloudscape-react-ts-website/cloudscape-react-ts-website-project.js:10:18)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/Users/jacsteve/stuff/random/foo/node_modules/@aws/pdk/cloudscape-react-ts-website/cloudscape-react-ts-website-project.js',
    '/Users/jacsteve/stuff/random/foo/node_modules/@aws/pdk/cloudscape-react-ts-website/index.js',
    '/Users/jacsteve/stuff/random/foo/node_modules/@aws/pdk/index.js',
    '/Users/jacsteve/.npm/_npx/07946fd0f68b1c52/node_modules/projen/lib/projects.js',
    '/Users/jacsteve/.npm/_npx/07946fd0f68b1c52/node_modules/projen/lib/cli/cmds/new.js',
    '/Users/jacsteve/.npm/_npx/07946fd0f68b1c52/node_modules/projen/lib/cli/index.js',
    '/Users/jacsteve/.npm/_npx/07946fd0f68b1c52/node_modules/projen/bin/projen'
  ]
}
/usr/local/lib/node_modules/@aws/pdk/node_modules/execa/index.js:212
        throw error;
        ^

Error: Command failed with exit code 1: npx --yes projen@latest new --from @aws/pdk monorepo-ts
    at makeError (/usr/local/lib/node_modules/@aws/pdk/node_modules/execa/lib/error.js:60:11)
    at module.exports.sync (/usr/local/lib/node_modules/@aws/pdk/node_modules/execa/index.js:194:17)
    at module.exports.commandSync (/usr/local/lib/node_modules/@aws/pdk/node_modules/execa/index.js:235:15)
    at Object.<anonymous> (/usr/local/lib/node_modules/@aws/pdk/_scripts/exec-command.js:11:9)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
    at node:internal/main/run_main_module:23:47 {
  shortMessage: 'Command failed with exit code 1: npx --yes projen@latest new --from @aws/pdk monorepo-ts',
  command: 'npx --yes projen@latest new --from @aws/pdk monorepo-ts',
  escapedCommand: 'npx --yes "projen@latest" new --from "@aws/pdk" monorepo-ts',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Reproduction Steps

pdk new monorepo-ts

Possible Solution

No response

Additional Information/Context

Working in 0.22.20: ie npx projen new --from @aws/pdk@0.22.20 monorepo-ts

PDK version used

0.22.22

What languages are you seeing this issue on?

Typescript, Java, Python

Environment details (OS name and version, etc.)

OSX

cogwirrel commented 1 year ago

Fixed in https://github.com/aws/aws-pdk/pull/620

cogwirrel commented 1 year ago

Fix released in 0.22.24