Last active
January 18, 2024 20:35
-
-
Save shershen08/1a9d3fc72e81d51c35b1a27a5d83a7bb to your computer and use it in GitHub Desktop.
fix ts-node not installed error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | |
case `uname` in | |
*CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
esac | |
if [ -z "$NODE_PATH" ]; then | |
export NODE_PATH="<some_path>common/cli/node_modules:<some_path>common/node_modules:<some_path>node_modules:<some_path>/node_modules:<some_path>node_modules:/Users/node_modules:/node_modules:<some_path>Library/pnpm/global/5/.pnpm/node_modules" | |
else | |
export NODE_PATH="<some_path>common/cli/node_modules:<some_path>common/node_modules:<some_path>node_modules:<some_path>/node_modules:<some_path>node_modules:/Users/node_modules:/node_modules:<some_path>Library/pnpm/global/5/.pnpm/node_modules:$NODE_PATH" | |
fi | |
# check if ts-node is installed | |
which ts-node | |
if [[ $? != 0 ]]; then | |
echo "\n ts-node is not installed, please install 'ts-node' globally first" | |
exit 1 | |
fi | |
if [ -x "$basedir/ts-node" ]; then | |
exec "$basedir/ts-node" "$basedir/../../../../../Library/pnpm/global/5/node_modules/@juicyllama/cli/cli.ts" "$@" | |
else | |
exec ts-node "$basedir/../../../../../Library/pnpm/global/5/node_modules/@juicyllama/cli/cli.ts" "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment