Search from Alfred4 returns no result and promt error
Hi, I installed the v1.0.1 alfred workflow and it didn't work. Upon checking the debug log in Alfred, I found this:
[17:24:41.389] ERROR: massCode assistant[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.24F03A81-51F1-4536-9238-725411581965%3E177039CF-0717-4E00-9FE3-69F90DD802A6)] Code 1: node:internal/errors:465
ErrorCaptureStackTrace(err);
^
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'conf' imported from /Users/x/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.24F03A81-51F1-4536-9238-725411581965/node_modules/alfy/index.js
at new NodeError (node:internal/errors:372:5)
at packageResolve (node:internal/modules/esm/resolve:954:9)
at moduleResolve (node:internal/modules/esm/resolve:1003:20)
at defaultResolve (node:internal/modules/esm/resolve:1218:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:580:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:294:18)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:80:40)
at link (node:internal/modules/esm/module_job:78:36) {
code: 'ERR_MODULE_NOT_FOUND'
}
I am not quite familiar with js, and I am new to Alfred, I am not sure if I messed anything up.
I found a way to fix this.
// cd to the directory of the workflow
cd /Users/x/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.24F03A81-51F1-4536-9238-725411581965/
npm install
However the problem is within the .alfredworkflow, hope you can fix it soon.
I found a way to fix this.
// cd to the directory of the workflow cd /Users/x/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.24F03A81-51F1-4536-9238-725411581965/ npm installHowever the problem is within the
.alfredworkflow, hope you can fix it soon.
This also fixed the issue for me. M1 Macbook Pro with Alfred v 5.0.1
hm, npm install in the directory did not fix it for me. Any additional steps I'm missing?
hm,
npm installin the directory did not fix it for me. Any additional steps I'm missing?![]()
![]()
Not sure if this is related, my node version is v16.15.1.
Good hint @LeslieLeung, upgraded mine to v18.8.0 and your workaround resolves the issue.
I found a way to fix this.
// cd to the directory of the workflow cd /Users/x/Preferences/Alfred/Alfred.alfredpreferences/workflows/user.workflow.24F03A81-51F1-4536-9238-725411581965/ npm installHowever the problem is within the
.alfredworkflow, hope you can fix it soon.
Thank you, this solved the problem for me. The path I found here.

Thank you, it also worked for me.