rhyd Posted June 21, 2022 Author Share Posted June 21, 2022 @mike007 problem here is that macOS no longer supports python and therefore this workflow without some additional steps on your part. You can either: 1. follow Alfred's instructions to install a version of Python 2 to allow this workflow to continue working on Monterey 2. install my alternative Javascript version of the workflow (install instructions) I'd recommend #2 - let me know how you get on. Link to comment
mike007 Posted June 22, 2022 Share Posted June 22, 2022 Thanks @rhyd I am so hopeless on this! I have tired to install your version. Have a version number for both the node and nmp, so go to run npm install --global alfred-search-omnifocus Presumably in the terminal? and I just get a whole page of errors. Never mind! I will call it a day!! Link to comment
jochi Posted July 11, 2022 Share Posted July 11, 2022 (edited) Thanks for this update! I set the OmniFocus DB location per the installation instructions but the workflow is giving me this error (even though the directory does exist). Any ideas? EDIT → WORKAROUND FOUND After you run "find-of-db" you will need to remove the line breaks that are getting inserted where they don't belong before running "set-of-db" Issue is here: https://github.com/rhydlewis/alfred-search-omnifocus/issues/9 Edited July 14, 2022 by jochi Found a workaround, wanted to include it inline Damoeire 1 Link to comment
rhyd Posted July 14, 2022 Author Share Posted July 14, 2022 @jochi glad you found the answer at GitHub - sorry for the slow response here from me. Link to comment
YuTang Posted July 16, 2022 Share Posted July 16, 2022 Thank you for your incredible workflow! It seems that it doesn't work now for my OmniFocus(Version 3.12.2), when I try to search something in my OmniFocus using this workflow I just get nothing. I wonder whether it's the problem of my OmniFocus/Alfred/Mac or it's because of the workflow. Thank you! Link to comment
vitor Posted July 16, 2022 Share Posted July 16, 2022 @YuTang Open the debugger and perform the failing action. That should give information to help understand what is happening. YuTang 1 Link to comment
vitor Posted August 7, 2022 Share Posted August 7, 2022 @rhyd In your GitHub home, you’re listing the Python version of the Workflow instead of the new node one. Link to comment
rhyd Posted August 8, 2022 Author Share Posted August 8, 2022 @vitor good spot - thanks, updated Link to comment
jstncwlcx Posted January 16 Share Posted January 16 @rhydI just posted about using the python version of the workflow, but I was in the wrong place, and found the node one. Now I admit, I don't know much about terminal, so perhaps this is over my head, and I don't expect you to teach me, but I thought I'd ask in case there was an easy fix. I followed all of the directions to install and test node here: https://treehouse.github.io/installation-guides/mac/node-mac.html According to the steps provided it was successful. When I then went to use the npm install --global alfred-search-omnifocus command, I get these errors: (**** = me and my system's name) Am I missing something? Is there anything to fix? I appreciate your time and consideration. npm@8.15.0 /usr/local/lib/node_modules/npm **** ~ % npm <command> --key=value zsh: no such file or directory: command **** ~ % npm install --global alfred-search-omnifocus npm WARN deprecated xmldom@0.1.31: Deprecated due to CVE-2021-21366 resolved in 0.5.0 npm ERR! code 1 npm ERR! path /opt/homebrew/Cellar/node/19.4.0_1/lib/node_modules/alfred-search-omnifocus/node_modules/better-sqlite3 npm ERR! command failed npm ERR! command sh /var/folders/sc/26yzps7x15dfdg5n56n8kq2r0000gn/T/install-d0aa4b18.sh npm ERR! > better-sqlite3@7.6.2 build-release npm ERR! > node-gyp rebuild --release npm ERR! npm ERR! TOUCH ba23eeee118cd63e16015df367567cb043fed872.intermediate npm ERR! ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 ba23eeee118cd63e16015df367567cb043fed872.intermediate npm ERR! TOUCH Release/obj.target/deps/locate_sqlite3.stamp npm ERR! CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o npm ERR! LIBTOOL-STATIC Release/sqlite3.a npm ERR! CXX(target) Release/obj.target/better_sqlite3/src/better_sqlite3.o npm ERR! rm ba23eeee118cd63e16015df367567cb043fed872.intermediate npm ERR! prebuild-install warn install No prebuilt binaries found (target=19.4.0 runtime=node arch=arm64 libc= platform=darwin) npm ERR! gyp info it worked if it ends with ok npm ERR! gyp info using node-gyp@9.3.0 npm ERR! gyp info using node@19.4.0 | darwin | arm64 npm ERR! gyp info find Python using Python version 3.10.9 found at "/opt/homebrew/opt/python@3.10/bin/python3.10" npm ERR! gyp info spawn /opt/homebrew/opt/python@3.10/bin/python3.10 npm ERR! gyp info spawn args [ npm ERR! gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py', npm ERR! gyp info spawn args 'binding.gyp', npm ERR! gyp info spawn args '-f', npm ERR! gyp info spawn args 'make', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/opt/homebrew/Cellar/node/19.4.0_1/lib/node_modules/alfred-search-omnifocus/node_modules/better-sqlite3/build/config.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi', npm ERR! gyp info spawn args '-I', npm ERR! gyp info spawn args ‘/Users/****/Library/Caches/node-gyp/19.4.0/include/node/common.gypi’, npm ERR! gyp info spawn args '-Dlibrary=shared_library', npm ERR! gyp info spawn args '-Dvisibility=default', npm ERR! gyp info spawn args ‘-Dnode_root_dir=/Users/****/Library/Caches/node-gyp/19.4.0’, npm ERR! gyp info spawn args '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp', npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/****/Library/Caches/node-gyp/19.4.0/<(target_arch)/node.lib', npm ERR! gyp info spawn args '-Dmodule_root_dir=/opt/homebrew/Cellar/node/19.4.0_1/lib/node_modules/alfred-search-omnifocus/node_modules/better-sqlite3', npm ERR! gyp info spawn args '-Dnode_engine=v8', npm ERR! gyp info spawn args '--depth=.', npm ERR! gyp info spawn args '--no-parallel', npm ERR! gyp info spawn args '--generator-output', npm ERR! gyp info spawn args 'build', npm ERR! gyp info spawn args '-Goutput_dir=.' npm ERR! gyp info spawn args ] npm ERR! gyp info spawn make npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] npm ERR! In file included from ../src/better_sqlite3.cpp:4: npm ERR! In file included from ./src/better_sqlite3.lzz:11: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/node.h:73: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8.h:24: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-array-buffer.h:12: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-local-handle.h:12: npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:477:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! SHARED_EXTERNAL_POINTER_TAGS(CHECK_SHARED_EXTERNAL_POINTER_TAGS) npm ERR! ^ npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:477:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:477:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:477:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:477:30: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! PER_ISOLATE_EXTERNAL_POINTER_TAGS(CHECK_NON_SHARED_EXTERNAL_POINTER_TAGS) npm ERR! ^ npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:478:35: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:659:61: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! static_assert(kJSObjectType + 1 == kFirstJSApiObjectType); npm ERR! ^ npm ERR! , "" npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:660:55: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! static_assert(kJSObjectType < kLastJSApiObjectType); npm ERR! ^ npm ERR! , "" npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-internal.h:661:63: warning: 'static_assert' with no message is a C++17 extension [-Wc++17-extensions] npm ERR! static_assert(kFirstJSApiObjectType < kLastJSApiObjectType); npm ERR! ^ npm ERR! , "" npm ERR! In file included from ../src/better_sqlite3.cpp:4: npm ERR! In file included from ./src/better_sqlite3.lzz:11: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/node.h:73: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8.h:24: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-array-buffer.h:13: npm ERR! In file included from /Users/j****/Library/Caches/node-gyp/19.4.0/include/node/v8-object.h:9: npm ERR! /Users/****Library/Caches/node-gyp/19.4.0/include/node/v8-maybe.h:106:45: error: no template named 'is_lvalue_reference_v' in namespace 'std'; did you mean 'is_lvalue_reference'? npm ERR! template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*> npm ERR! ~~~~~^~~~~~~~~~~~~~~~~~~~~ npm ERR! is_lvalue_reference npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:910:29: note: 'is_lvalue_reference' declared here npm ERR! struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { }; npm ERR! ^ npm ERR! In file included from ../src/better_sqlite3.cpp:4: npm ERR! In file included from ./src/better_sqlite3.lzz:11: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/node.h:73: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8.h:24: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-array-buffer.h:13: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-object.h:9: npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-maybe.h:106:69: error: expected '(' for function-style cast or type construction npm ERR! template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*> npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-maybe.h:123:43: error: no template named 'is_lvalue_reference_v' in namespace 'std'; did you mean 'is_lvalue_reference'? npm ERR! template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr> npm ERR! ~~~~~^~~~~~~~~~~~~~~~~~~~~ npm ERR! is_lvalue_reference npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/type_traits:910:29: note: 'is_lvalue_reference' declared here npm ERR! struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { }; npm ERR! ^ npm ERR! In file included from ../src/better_sqlite3.cpp:4: npm ERR! In file included from ./src/better_sqlite3.lzz:11: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/node.h:73: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8.h:24: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-array-buffer.h:13: npm ERR! In file included from /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-object.h:9: npm ERR! /Users/****/Library/Caches/node-gyp/19.4.0/include/node/v8-maybe.h:123:67: error: expected '(' for function-style cast or type construction npm ERR! template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr> npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ npm ERR! ./src/util/macros.lzz:157:21: error: no member named 'AccessorSignature' in namespace 'v8' npm ERR! v8::AccessorSignature::New(isolate, recv) npm ERR! ~~~~^ npm ERR! ./src/objects/database.lzz:180:21: warning: variable 'status' set but not used [-Wunused-but-set-variable] npm ERR! int status = sqlite3_db_config(db_handle, SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION, 1, NULL); npm ERR! ^ npm ERR! ./src/util/binder.lzz:37:51: error: no member named 'CreationContext' in 'v8::Object' npm ERR! v8::Local<v8::Context> ctx = obj->CreationContext(); npm ERR! ~~~~~^ npm ERR! 21 warnings and 6 errors generated. npm ERR! make: *** [Release/obj.target/better_sqlite3/src/better_sqlite3.o] Error 1 npm ERR! gyp ERR! build error npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2 npm ERR! gyp ERR! stack at ChildProcess.onExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:203:23) npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28) npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:293:12) npm ERR! gyp ERR! System Darwin 22.2.0 npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/19.4.0_1/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release" npm ERR! gyp ERR! cwd /opt/homebrew/Cellar/node/19.4.0_1/lib/node_modules/alfred-search-omnifocus/node_modules/better-sqlite3 npm ERR! gyp ERR! node -v v19.4.0 npm ERR! gyp ERR! node-gyp -v v9.3.0 npm ERR! gyp ERR! not ok npm ERR! A complete log of this run can be found in: npm ERR! /Users/****/.npm/_logs/2023-01-16T15_02_37_959Z-debug-0.log ****@**** ~ % Link to comment
rhyd Posted January 16 Author Share Posted January 16 Hi @jstncwlcx - thanks for raising this. I think I need to look at the latest version of better-sqlite3 and how that works with the latest version of node. Let me do this first and then - 🤞 - I can release an updated version of the workflow to solve this wretched issue... Cheers, Rhyd Link to comment
jstncwlcx Posted January 16 Share Posted January 16 @rhydThanks so much for the response! Will keep my eyes open on this space. Link to comment
rhyd Posted January 22 Author Share Posted January 22 I've updated the workflow to v1.0.12 so that it uses the latest versions of the packages it relies on to function correctly. Horror show complication errors seen before are now - as far as I can see - no longer happening. I've had issues with different versions of node and different shells on my Mac but I think if you switch to a bash shell before installing, the problems seen before won't happen: > bash bash-3.2$ node -v v18.12.1 bash-3.2$ npm install -g alfred-search-omnifocus ... Link to comment
jstncwlcx Posted January 22 Share Posted January 22 Thanks for the reply. Like I said, I don't know much about terminal or code, so this is above my head. I really only know how to copy and paste stuff. I copied and pasted the lines you quoted into terminal, and literally nothing happened. If you feel like it, can you walk me through what it is I am supposed to do with those lines you posted? I don't expect you to teach me, so please don't think I'm expecting anything. I just thought I'd ask in case it was simple and easy to explain. Link to comment
rhyd Posted Wednesday at 07:43 PM Author Share Posted Wednesday at 07:43 PM (edited) On 1/22/2023 at 5:21 PM, jstncwlcx said: Thanks for the reply. Like I said, I don't know much about terminal or code, so this is above my head. I really only know how to copy and paste stuff. I copied and pasted the lines you quoted into terminal, and literally nothing happened. If you feel like it, can you walk me through what it is I am supposed to do with those lines you posted? I don't expect you to teach me, so please don't think I'm expecting anything. I just thought I'd ask in case it was simple and easy to explain. Hi - no problem, this updated workflow has been more of a pain than the old version. It hasn't been a great user experience for everyone - apologies. Here's step by step instructions: Open terminal.app Type in `bash` and then press RETURN Type in `npm install -g alfred-search-omnifocus` and press RETURN You should then see a progress bar as the `npm` command downloads the required files and installs the workflow. If that doesn't work, let me know and I'll see if I can do something else to help. Screenshots to accompany each step above... Edited Wednesday at 07:44 PM by rhyd Link to comment
jstncwlcx Posted Friday at 04:49 PM Share Posted Friday at 04:49 PM I'm still not able to get it working. It is probably user error on my end. But here is what I get... The Then when I try to enter the .s command in Alfred I get this: Then, then I enter 'get-of-db' into Alfred, and hit enter, I just get a big Pop-up that says:] Link to comment
rhyd Posted Friday at 05:22 PM Author Share Posted Friday at 05:22 PM 31 minutes ago, jstncwlcx said: I'm still not able to get it working. It is probably user error on my end. But here is what I get... The Then when I try to enter the .s command in Alfred I get this: Then, then I enter 'get-of-db' into Alfred, and hit enter, I just get a big Pop-up that says:] We're getting there... Next is: 1. Run Alfred command `find-of-db` to copy the path of the Omnifocus DB to your clipboard 2. Run Alfred command `set-of-db` and then paste (⌘-V) the database path as an argument and hit return then retry. jstncwlcx 1 Link to comment
jstncwlcx Posted Friday at 05:54 PM Share Posted Friday at 05:54 PM It works! Thank you so much! Link to comment
rhyd Posted Saturday at 09:18 PM Author Share Posted Saturday at 09:18 PM @jstncwlcx 👍 hooray! 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