que23 Posted September 18, 2018 Share Posted September 18, 2018 When I try to run a command in a bash script via Alfred jq . junk.json > junk2.json The contents of junk2 will be deleted. Strange behavior. I can't seem to run any node app. node /dir/nodeapp doesn't work either. Link to comment
deanishe Posted September 18, 2018 Share Posted September 18, 2018 4 minutes ago, que23 said: The contents of junk2 will be deleted. Strange behavior. You're overwriting a file with the output of a command that has no output. An empty file is the expected result. 5 minutes ago, que23 said: I can't seem to run any node app That's because node isn't on PATH. Alfred doesn't use your shell PATH. Use /usr/local/bin/node instead of just node. Link to comment
que23 Posted September 18, 2018 Author Share Posted September 18, 2018 I had to use : npm config get prefix which only found the version, I had to drill even further down to find node. It looked like this: /Users/me/.nvm/versions/node/v8.9.3/bin/node NODEAPP It works now. Thanks Link to comment
deanishe Posted September 18, 2018 Share Posted September 18, 2018 (edited) Good good. Next time you have a Node question, it'd probably be a good idea to mention you're using nvm. Most people will assume you've installed Node via Homebrew because they're familiar with distributable workflows. Edited September 18, 2018 by deanishe Link to comment
que23 Posted September 18, 2018 Author Share Posted September 18, 2018 1 minute ago, deanishe said: Good good. Next time you have a Node question, it'd probably be a good idea to mention you're using nvm. Sorry, so is there a way to load paths globally in alfred? Link to comment
deanishe Posted September 18, 2018 Share Posted September 18, 2018 Not directly, no. You would need to change your default user path. Personally, I'm a bit wary of doing that because I develop workflows and having a non-default PATH could mask problems that would occur on unmodified systems. That may or may not be an issue for you. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now