tsconfig.json icon indicating copy to clipboard operation
tsconfig.json copied to clipboard

Doing npx tsconfig.json creates a file, but doesn't prompt me to choose the framework I'm using

Open georgeisamazed opened this issue 3 years ago • 4 comments

It should let me choose between react, react native or node (as per this video https://www.youtube.com/watch?v=I6ypD7qv3Z8&t=296s) but it only create a file with the following


#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
  "$basedir/node"  "$basedir/../tsconfig.json/src/index.js" "$@"
  ret=$?
else 
  node  "$basedir/../tsconfig.json/src/index.js" "$@"
  ret=$?
fi
exit $ret

georgeisamazed avatar Jan 24 '22 02:01 georgeisamazed

I am also experiencing the same problem, the solution is found in issue #18

daedadev avatar Mar 04 '22 04:03 daedadev

Related https://github.com/npm/cli/issues/4445 and https://github.com/npm/exec/issues/17

OmgImAlexis avatar Mar 07 '22 22:03 OmgImAlexis

The work around is to install it globally and then manually call the file like so.

npm i -g tsconfig.json
C:\"Program Files"\nodejs\tsconfig.json.cmd

OmgImAlexis avatar Mar 07 '22 22:03 OmgImAlexis

The work around is to install it globally and then manually call the file like so.

npm i -g tsconfig.json
C:\"Program Files"\nodejs\tsconfig.json.cmd

This work thanks!

Here's what I did in the terminal:

npm i -g tsconfig.json
npx tsconfig.json.cmd

raditya26 avatar Jan 31 '24 17:01 raditya26