Last active
July 26, 2021 13:39
-
-
Save rubenlozano/4521689 to your computer and use it in GitHub Desktop.
Running JavaScript in OS X terminal
This file contains hidden or 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
There is a javascript console, called JSC, in: | |
/System/Library/Frameworks/JavaScriptCore.framework/Versions/Current/Resources/jsc | |
JSC is not in the shell PATH by default, to fix that: | |
$ sudo ln /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc /usr/local/bin | |
Note that you'll have to use debug() instead of the conventional console.log() in your script to see any output. |
JavaScript is not built-in Mac OS by default?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ln: /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc: No such file or directory
getting this error