1. 程式人生 > >[Node] Run Any Version of a Node Tool with npx

[Node] Run Any Version of a Node Tool with npx

with reac try one rip err install projects not

As node projects evolve, new features are added all the time. This results in different errors or results as you‘re migrating from one version to another. npx allows you to try out any version you want by simply adding the version number to the project you‘re using. This lesson covers using the TypeScript compiler through a different versions as async function support was added.

Install:

npm install -g npx

Usage:

npx typescript@1.6 index.ts
npx typescript --target es2017 index.ts // Use the latest version

[Node] Run Any Version of a Node Tool with npx