[英]How do I get public DNS after creating AWS EC2 instance with CDK?
[英]AWS CDK: AWS-ec2 SyntaxError: Unexpected token '.' after update node
我更新 NX 和相关版本。 所以现在使用节点14.15.0
而不是节点12.20.2
节点版本更新。 所以我更新了aws-cdk
包。 但现在以下命令不再起作用。 问题是aws-ec2
中的可选链接运算符。
npx env-cmd -f pipeline.json npx ts-node --project./scripts/tsconfig.json./apps/cloud-infrastructure/src/bin/pre-build.ts
执行上述命令时出现以下错误。
节点版本14.15.0
。 (也试过另一个版本)
ts config tsconfig.base.json
中的编译器选项
"compileOnSave": false,
"compilerOptions": {
"rootDir": ".",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"module": "esnext",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom",
"esnext.asynciterable"
],
"skipLibCheck": true,
"skipDefaultLibCheck": true
}
"files": [
"./polyfills.localize.ts"
],
"exclude": [
"node_modules",
"tmp"
]
配置文件
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"types": ["node", "jest"],
"lib": ["ES6", "ES2017", "es2015", "ES2020.Promise"],
"module": "CommonJS"
},
"include": ["**/*.ts"]
}
如 GitHub 问题的答案所述,您可能需要将 Node 从 12 更新(更新到 14 或 16)。 执行此操作的最佳方法是更新您的 package 文件,运行npm update
,然后解决依赖性问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.