Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

[DOCS] run pdk from the root hitting error #707

Closed
caopengau opened this issue Feb 29, 2024 · 1 comment
Closed

[DOCS] run pdk from the root hitting error #707

caopengau opened this issue Feb 29, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation needs-triage

Comments

@caopengau
Copy link
Contributor

Describe the issue

Following the contributing guide, after the new class is created, instantiated it within .projenrc.ts, running pdk hitting this java error "no exported member 'ParentPom'"

Links

❯ pdk

> @aws/pdk-monorepo@0.0.0 default /Users/pengcao/workspace/aws-pdk
> pnpm exec projen default

👾 default | ts-node --project tsconfig.dev.json .projenrc.ts
/Users/pengcao/workspace/aws-pdk/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.18.9_typescript@5.2.2/node_modules/ts-node/src/index.ts:859
    return new TSError(diagnosticText, diagnosticCodes, diagnostics);
           ^
TSError: ⨯ Unable to compile TypeScript:
packages/monorepo/src/projects/java/java-project-options.ts:99:29 - error TS2694: Namespace '"/Users/pengcao/workspace/aws-pdk/node_modules/.pnpm/projen@0.79.6_constructs@10.3.0/node_modules/projen/lib/java/index"' has no exported member 'ParentPom'.

99   readonly parentPom?: java.ParentPom;
                               ~~~~~~~~~

    at createTSError (/Users/pengcao/workspace/aws-pdk/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.18.9_typescript@5.2.2/node_modules/ts-node/src/index.ts:859:12)
    at reportTSError (/Users/pengcao/workspace/aws-pdk/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.18.9_typescript@5.2.2/node_modules/ts-node/src/index.ts:863:19)
    at getOutput (/Users/pengcao/workspace/aws-pdk/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.18.9_typescript@5.2.2/node_modules/ts-node/src/index.ts:1077:36)
    at Object.compile (/Users/pengcao/workspace/aws-pdk/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.18.9_typescript@5.2.2/node_modules/ts-node/src/index.ts:1433:41)
    at Module.m._compile (/Users/pengcao/workspace/aws-pdk/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.18.9_typescript@5.2.2/node_modules/ts-node/src/index.ts:1617:30)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Object.require.extensions.<computed> [as .ts] (/Users/pengcao/workspace/aws-pdk/node_modules/.pnpm/ts-node@10.9.1_@types+node@18.18.9_typescript@5.2.2/node_modules/ts-node/src/index.ts:1621:12)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Function.Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19) {
  diagnosticCodes: [ 2694 ]
}
👾 Task "default" failed when executing "ts-node --project tsconfig.dev.json .projenrc.ts" (cwd: /Users/pengcao/workspace/aws-pdk)
 ELIFECYCLE  Command failed with exit code 1.
/Users/pengcao/.nvm/versions/node/v20.11.1/lib/node_modules/@aws/pdk/node_modules/execa/index.js:212
		throw error;
		^

Error: Command failed with exit code 1: pnpm default
    at makeError (/Users/pengcao/.nvm/versions/node/v20.11.1/lib/node_modules/@aws/pdk/node_modules/execa/lib/error.js:60:11)
    at module.exports.sync (/Users/pengcao/.nvm/versions/node/v20.11.1/lib/node_modules/@aws/pdk/node_modules/execa/index.js:194:17)
    at module.exports.commandSync (/Users/pengcao/.nvm/versions/node/v20.11.1/lib/node_modules/@aws/pdk/node_modules/execa/index.js:235:15)
    at Object.<anonymous> (/Users/pengcao/.nvm/versions/node/v20.11.1/lib/node_modules/@aws/pdk/_scripts/exec-command.js:37:9)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023: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 default',
  command: 'pnpm default',
  escapedCommand: 'pnpm default',
  exitCode: 1,
  signal: undefined,
  signalDescription: undefined,
  stdout: undefined,
  stderr: undefined,
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}

Node.js v20.11.1

@caopengau caopengau added documentation Improvements or additions to documentation needs-triage labels Feb 29, 2024
@caopengau
Copy link
Contributor Author

Need to reinstall packages and the problem is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation needs-triage
Projects
None yet
Development

No branches or pull requests

1 participant