-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default installation doesn't seem to work on macOS #11
Comments
just had the same thing happen to me |
No luck here either. No output, no error, exit status 0, but doesn't seem to do anything. |
@pixelcmtd @jareware it looks like it relies on Here's a little bash script I whipped up: #!/usr/bin/env bash
set -Eeuf -o pipefail
shopt -s inherit_errexit
main() {
infile=$1
tmpfile=$(mktemp)
/opt/homebrew/opt/llvm/bin/clang-format "${infile}" > "${tmpfile}"
cp "${tmpfile}" "${infile}"
}
main "$@" |
I was able to sort of get it to work on my MacBook using the following steps - Watched the first part of this video titled "What is NPM and why do we need it?" That video does a good job of explaining what is going on. In summary, node is a JavaScript runtime built on Chrome's V8 JavaScript engine and npm is a program for downloading programs from npm which is a repository for sharing programs. It is annoying that they used the same name for a program and website, but hey its free. Per the video I went to nodejs.org and it showed me a download button for my operating system. This one button downloads both node and npm. Then I found the terminal program in the Applications folder/Utilities folder and checked that both ran by typing: node -v and: npm -v per the video. After some failed attempts, I figured out that you have to type sudo in front of the npm install command to have admin privileges to actually get it to work somewhat. So, in terminal, type: sudo npm install -g openscad-format It loaded something like 350 files, and had 3 errors and some files needed "funding". I have no idea how to resolve the errors, and was going to give up. But I tried openscad-format anyway and it seems to work. I was able to run openscad-format by changing directory (cd) to where I had my file and typing the commands per the directions. It formatted my 800 line program to 1200 lines, but it looks better. In two of the lines that were long it broke up a variable and put commas in the center. I got undefined errors when I ran the preview and was able to easily fix it. I don't think the -j option works because I could not find any templates, so maybe this was related to the errors. Note that I never created a NPM username or password, and I did not need to go to their website at all to do this. |
The above outputs nothing. 🤔
The text was updated successfully, but these errors were encountered: