I am trying to generate a CDK project using typescript. I tried following the getting started where you init a project named hello-cdk. Then I just tried making my own project in a different folder. In both cases I get the same result:
C:\work\my-proj>npm run build
> braun-aws@0.1.0 build
> tsc
C:\work\my-proj>cdk synth
C:\work\my-proj\node_modules\ts-node\src\index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
error TS5083: Cannot read file 'C:\work\my-proj\.config\webpack\tsconfig.webpack.json'.
at createTSError (C:\work\my-proj\node_modules\ts-node\src\index.ts:859:12)
at reportTSError (C:\work\my-proj\node_modules\ts-node\src\index.ts:863:19)
at createFromPreloadedConfig (C:\work\my-proj\node_modules\ts-node\src\index.ts:874:36)
at phase4 (C:\work\my-proj\node_modules\ts-node\src\bin.ts:543:44)
at bootstrap (C:\work\my-proj\node_modules\ts-node\src\bin.ts:95:10)
at main (C:\work\my-proj\node_modules\ts-node\src\bin.ts:55:10)
at Object.<anonymous> (C:\work\my-proj\node_modules\ts-node\src\bin.ts:800:3)
at Module._compile (node:internal/modules/cjs/loader:1155:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
at Module.load (node:internal/modules/cjs/loader:1033:32) {
diagnosticCodes: [ 5083 ]
}
My versions:
npm: '8.8.0',
node: '16.18.0',
v8: '9.4.146.26-node.22',
uv: '1.43.0',
zlib: '1.2.11',
brotli: '1.0.9',
ares: '1.18.1',
modules: '93',
nghttp2: '1.47.0',
napi: '8',
llhttp: '6.0.10',
openssl: '1.1.1q+quic',
cldr: '41.0',
icu: '71.1',
tz: '2022b',
unicode: '14.0',
ngtcp2: '0.8.1',
nghttp3: '0.7.0'
For devDependencies, there's a few things that could use updating but I didn't change them from what aws-cdk init
generated. This is the result of npm-check-updates
@types/jest ^27.5.2 → ^29.2.0
@types/node 10.17.27 → 18.11.5
@types/prettier 2.6.0 → 2.7.1
jest ^27.5.1 → ^29.2.2
ts-jest ^27.1.4 → ^29.0.3
typescript ~3.9.7 → ~4.8.4
constructs ^10.0.0 → ^10.1.139
So what seems to be happening here is that somebody was supposed to generate a .config directory with a webpack config in it, and it didn't. What's also interesting is that npm list --all
doesn't even mention webpack.
I'm kind of stuck right out of the chute, did I miss a step?