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

SyntaxError: Unexpected identifier

Open bunnyxt opened this issue 3 years ago • 1 comments

Hello all,

I encountered a problem when finish typing the keyword masscode in the alfred input bar, the Search snippets option disappears. I checked the log and see the following error.

Screen Recording 2023-01-18 at 12 55 23 2023-01-18 12_57_16

[12:51:55.413] massCode assistant[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.CBFBCF26-1FC2-48A1-A472-5D1C789179B5%3E177039CF-0717-4E00-9FE3-69F90DD802A6)] Queuing argument '(null)'
[12:51:55.779] massCode assistant[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.CBFBCF26-1FC2-48A1-A472-5D1C789179B5%3E177039CF-0717-4E00-9FE3-69F90DD802A6)] Script with argv '(null)' finished
[12:51:55.781] ERROR: massCode assistant[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.CBFBCF26-1FC2-48A1-A472-5D1C789179B5%3E177039CF-0717-4E00-9FE3-69F90DD802A6)] Code 1: /Users/bunnyxt/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.CBFBCF26-1FC2-48A1-A472-5D1C789179B5/index.js:1
(function (exports, require, module, __filename, __dirname) { import alfy from 'alfy'
                                                                     ^^^^

SyntaxError: Unexpected identifier
    at new Script (vm.js:79:7)
    at createScript (vm.js:251:10)
    at Object.runInThisContext (vm.js:303:10)
    at Module._compile (internal/modules/cjs/loader.js:657:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
    at startup (internal/bootstrap/node.js:283:19)

I have tried npm install in the folder but not works. I even upgraded my node version to v16.13.2 but the error remains the same.

Any idea? Thanks!

bunnyxt avatar Jan 18 '23 21:01 bunnyxt

Please test : cd /Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.A634A520-FB18-426E-8EA5-B3A3EF02A620 && npm install

node : v14.17.0

rongl avatar Feb 11 '23 07:02 rongl