question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support ts-node app driver

See original GitHub issue

Instead of requiring a build step to convert the Typescript code to javascript, it would help development cycle time if cdk.json could say something like:

{
  "app": "ts-node bin/deploy.ts"
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:3
  • Comments:20 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
rix0rrrcommented, Dec 10, 2018

I think the missing piece of information here was “Windows”.

Your npx executable probably ends up being called npx.bat or npx.cmd. If you just type npx on the command-line, cmd.exe is going to try all the possible extensions, but our launcher won’t. Try updating your cdk.json to:

{
  "app": "npx.bat ts-node bin/my_widget_service.ts"
}

(Or npx.cmd… or maybe it’s even npx.js?)

1reaction
eladbcommented, Dec 9, 2018

Seems like the toolkit can’t find npx on your system. What node.js version are you using?

I verified the following configuration works with 0.19.0 and node.js v10.13.0:

cdk.json

{
  "app": "npx ts-node bin/hello-cdk.ts"
}

package.json:

{
  "devDependencies": {
    "@types/node": "^8.9.4",
    "aws-cdk": "^0.19.0",
    "ts-node": "^7.0.1",
    "typescript": "^3.1.2"
  },
  "dependencies": {
    "@aws-cdk/cdk": "^0.19.0"
  }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

ts-node - npm
ts -node supports a variety of options which can be specified via tsconfig.json , as CLI flags, as environment variables, or programmatically.
Read more >
TypeScript Support in the DataStax Node.js Drivers
I'm happy to announce built-in TypeScript support in our DataStax Node.js drivers for Apache Cassandra and DataStax Enterprise Node.js ...
Read more >
TypeScript Setup - WebdriverIO
You will need typescript and ts-node installed as devDependencies , via: npm; Yarn. $ npm install typescript ts-node ...
Read more >
Building a Production - Ready Node.js App with TypeScript ...
In this article, we will see how to build a Nodejs, TypeScript Application and deploy it to server with Docker.
Read more >
Node, TypeScript, Azure Web Apps — what could go wrong. A ...
And Azure Web App only supports 32bit node. In that case, you will need to ship your own version of node; Your typescript...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found