assistant-alfred icon indicating copy to clipboard operation
assistant-alfred copied to clipboard

Search from Alfred4 returns no result and promt error

Open LeslieLeung opened this issue 2 years ago • 7 comments

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.

LeslieLeung avatar Jun 26 '22 09:06 LeslieLeung

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.

LeslieLeung avatar Jun 30 '22 11:06 LeslieLeung

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.

This also fixed the issue for me. M1 Macbook Pro with Alfred v 5.0.1

enderwiggens avatar Aug 04 '22 14:08 enderwiggens

hm, npm install in the directory did not fix it for me. Any additional steps I'm missing?

Screen Shot 2022-08-24 at 3 22 57 PM Screen Shot 2022-08-24 at 3 23 13 PM

paw-lu avatar Aug 24 '22 22:08 paw-lu

hm, npm install in the directory did not fix it for me. Any additional steps I'm missing?

Screen Shot 2022-08-24 at 3 22 57 PM Screen Shot 2022-08-24 at 3 23 13 PM

Not sure if this is related, my node version is v16.15.1.

LeslieLeung avatar Aug 25 '22 11:08 LeslieLeung

Good hint @LeslieLeung, upgraded mine to v18.8.0 and your workaround resolves the issue.

paw-lu avatar Aug 25 '22 16:08 paw-lu

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.

Thank you, this solved the problem for me. The path I found here. image

liusishan avatar Dec 01 '22 09:12 liusishan

Thank you, it also worked for me.

Josiah1 avatar Dec 30 '22 05:12 Josiah1