CLI Notes - cdig/docs GitHub Wiki
Terminal Errors & How To Grind Them
Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (88)
This error will often happen after installing a Mac OS update.
Run xcode-select --install
and confirm that you want to install the tools.
When that finishes, a cdig run
should work as expected.
NODE_MODULE_VERSION
Error: The module '/usr/local/lib/node_modules/cdig-cli/node_modules/syncprompt/build/Release/sync_prompt.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 67. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
Run npm uninstall -g cdig
Then, when that finishes, run npm i -g cdig
XCRUN
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Run xcode-select --install
and confirm that you want to install the tools.
node-gyp
If node-gyp is complaining about the command line tools being missing (even though they aren't), try the following:
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
Ivan's Special CLI Commands
Download deps manually
curl -OO https://raw.githubusercontent.com/cdig/cd-module-starter/v4-1/dist/{cdig,package}.json
run gulp manually
# substitute svga:debug for whatever task you want to run
gulp --gulpfile node_modules/cd-core/gulpfile.coffee --cwd . svga:debug
Bulk Updating A Folder
This structure allows you to run commands on all child folders of your pwd
:
for DIR in ./*; do cd "$DIR" && pwd && YOUR_COMMANDS_HERE && cd ..; done;
Example — redeploy all v4-1 projects in the current folder:
for DIR in ./*; do cd "$DIR" && pwd && cdig deploy -p && cdig clean && cd ..; done;
Point away from face.
Use a locally-cached node_modules
Make a folder ~/cdig/cli/
and put a node_modules folder there. Then, when you run a cdig pull
command, it'll first copy that node_modules to your project.
rsync dev/ to node_modules/
rsync --exclude "*/.git/" --delete -ar dev/* node_modules