Replies: 1 comment
|
There is no PnP (default). Resolve the aliased package and run it: yarn node "$(yarn node -p "require.resolve('tsc4/bin/tsc')")" --versionWant "scripts": {
"tsc4": "node -e \"require('child_process').spawnSync(process.execPath,[require.resolve('tsc4/bin/tsc'),...process.argv.slice(1)],{stdio:'inherit'})\" --"
}node-modules linker: node node_modules/tsc4/bin/tsc --versionPitfall: |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Say I have 2 typescript versions installed in package.json
yarn tsc --versionreturns5.6.2, which is expected. However, I'm not able to figure out how to run bin for the aliasedtsc4- something similar toyarn tsc4 --version(which doesn't work). Is there a syntax to specify specific dependency to run the binary? So far the only way I was able to find isyarn dlx -p tsc4@npm:typescript@4.9.5 tsc, but it seems to invoke temporary installation each time.All reactions