ctoend Posted October 24, 2019 Share Posted October 24, 2019 On 2/21/2018 at 12:35 AM, Nikersify said: Can you send more log output? What's your node.js version? didn't work at all, type in "trans test",nothing happend, i can find the workflow in the alfred settings Link to comment
Xusqui Posted January 19, 2020 Share Posted January 19, 2020 Sadly... It stopped working again Link to comment
romebot Posted January 22, 2020 Share Posted January 22, 2020 Hello. Been having trouble w/ this one. I downloaded Node.js and ran "$ npm install --global alfred-polyglot" in Terminal. It seemed like it was doing something and then got the errors below. I'm not sure if I was supposed to, but based on the resulting text below, I then ran: `chsh -s /bin/zsh` If I try to run "$ npm install --global alfred-polyglot" again I get: zsh: command not found: $. As this workflow doesn't show up in Alfred, I don't' know how to debug it. Assuming this doesn't work for me, how do I undo whatever I did in Terminal as well as uninstall Node.js (can I install it in any case or do I need it on my system after the install)? Thanks! Last login: Mon Jan 20 21:16:45 on console The default interactive shell is now zsh. To update your account to use zsh, please run `chsh -s /bin/zsh`. For more details, please visit https://support.apple.com/kb/HT208050. Foxs-MacBook-Pro:~ fox$ npm I alfred-polyglot > alfred-polyglot@1.4.0 postinstall /Users/fox/node_modules/alfred-polyglot > alfy-init npm WARN saveError ENOENT: no such file or directory, open ‘/Users/fox/package.json’ npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN enoent ENOENT: no such file or directory, open ‘/Users/fox/package.json’ npm WARN fox No description npm WARN fox No repository field. npm WARN fox No README data npm WARN fox No license field. + alfred-polyglot@1.4.0 added 238 packages from 86 contributors and audited 462 packages in 25.518s 3 packages are looking for funding run `npm fund` for details found 0 vulnerabilities Foxs-MacBook-Pro:~ fox$ trans !set default-language (language) -bash: !set: event not found Foxs-MacBook-Pro:~ fox$ trans !set default-language (en) -bash: !set: event not found Foxs-MacBook-Pro:~ fox$ trans !set default-language (English) -bash: !set: event not found Foxs-MacBook-Pro:~ fox$ trans !set default-language (en) -bash: !set: event not found Foxs-MacBook-Pro:~ fox$ Link to comment
deanishe Posted January 22, 2020 Share Posted January 22, 2020 (edited) 2 hours ago, romebot said: If I try to run "$ npm install --global alfred-polyglot" again I get: zsh: command not found: $. You're just supposed to run npm install --global alfred-polyglot The $ represents your shell prompt. It's a convention to show that "this is a shell command". 2 hours ago, romebot said: As this workflow doesn't show up in Alfred, I don't' know how to debug it. It's not so much a workflow as a Node module that contains a workflow. It won't show up in Alfred if the npm installation doesn't work. Edited January 22, 2020 by deanishe Link to comment
romebot Posted January 22, 2020 Share Posted January 22, 2020 Hi and thanks! so I did what you said, and it started loading something. and then the terminal says this: Last login: Wed Jan 22 10:01:19 on ttys000 fox@Foxs-MacBook-Pro ~ % $ npm install --global alfred-polyglot zsh: command not found: $ fox@Foxs-MacBook-Pro ~ % npm install --global alfred-polyglot npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules npm ERR! code EACCES npm ERR! syscall access npm ERR! path /usr/local/lib/node_modules npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules' npm ERR! [Error: EACCES: permission denied, access '/usr/local/lib/node_modules'] { npm ERR! stack: "Error: EACCES: permission denied, access '/usr/local/lib/node_modules'", npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'access', npm ERR! path: '/usr/local/lib/node_modules' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator. npm ERR! A complete log of this run can be found in: npm ERR! /Users/fox/.npm/_logs/2020-01-22T11_54_44_700Z-debug.log fox@Foxs-MacBook-Pro ~ % Link to comment
deanishe Posted January 22, 2020 Share Posted January 22, 2020 6 hours ago, romebot said: npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules You don't have permission to install the Node module. You may have accidentally run npm with admin permissions. Or it might be something to do with Catalina. Don't know. You'll have to ask @Nikersify. He's the expert. Link to comment
romebot Posted January 22, 2020 Share Posted January 22, 2020 @deanishe thanks. Hi @Nikersify, any ideas? thanks! Link to comment
drwatson Posted February 26, 2020 Share Posted February 26, 2020 (edited) [~]$ npm install --global alfred-polyglot > alfred-polyglot@1.4.0 postinstall /usr/local/opt/nvm/current/lib/node_modules/alfred-polyglot > alfy-init + alfred-polyglot@1.4.0 added 238 packages from 86 contributors in 5.207s [drwatson@zoro](06:36:50)(5.646s) [~]$ trans !set default-language vietnamese fish: Unknown command: trans package.json doesn't even have a "bin" section so how could trans get installed ? The doc doesn't really explain how the workflow gets installed either. How does this thing work ? Edited February 26, 2020 by drwatson Link to comment
Nikersify Posted February 26, 2020 Author Share Posted February 26, 2020 36 minutes ago, drwatson said: [~]$ npm install --global alfred-polyglot > alfred-polyglot@1.4.0 postinstall /usr/local/opt/nvm/current/lib/node_modules/alfred-polyglot > alfy-init + alfred-polyglot@1.4.0 added 238 packages from 86 contributors in 5.207s [drwatson@zoro](06:36:50)(5.646s) [~]$ trans !set default-language vietnamese fish: Unknown command: trans package.json doesn't even have a "bin" section so how could trans get installed ? The doc doesn't really explain how the workflow gets installed either. How does this thing work ? type “trans” in alfred not the console bud drwatson 1 Link to comment
drwatson Posted February 26, 2020 Share Posted February 26, 2020 2 hours ago, Nikersify said: type “trans” in alfred not the console bud I had tried that too. but it worked now for some reason. thanks Link to comment
drwatson Posted February 26, 2020 Share Posted February 26, 2020 @Nikersify awesome tool man. thanks a bunch. Link to comment
Bo-Frost-Mann Posted February 29, 2020 Share Posted February 29, 2020 I am suffering exactly the same problem. The translation dialogue pops up but when I starting to write my words the google, amazon search suggestions appear. I deactivated the standard translation dialogue and changed the initiation phrase. Nothing helped. Do you have an Idea what I could try? Thanks in advance Link to comment
Nikersify Posted February 29, 2020 Author Share Posted February 29, 2020 2 hours ago, Bo-Frost-Mann said: I am suffering exactly the same problem. The translation dialogue pops up but when I starting to write my words the google, amazon search suggestions appear. I deactivated the standard translation dialogue and changed the initiation phrase. Nothing helped. Do you have an Idea what I could try? Thanks in advance do you see the workflow in the workflows tab of your alfred settings? Link to comment
Bo-Frost-Mann Posted February 29, 2020 Share Posted February 29, 2020 thanks for the quick answer. Yes I do and it is also activated. Initially it always looks like everything is working well (when I start the workflow by typing the starting phrase) but when I type the word that should be translated the searches appear. Link to comment
Nikersify Posted February 29, 2020 Author Share Posted February 29, 2020 9 minutes ago, Bo-Frost-Mann said: thanks for the quick answer. Yes I do and it is also activated. Initially it always looks like everything is working well (when I start the workflow by typing the starting phrase) but when I type the word that should be translated the searches appear. can you go into the workflow's settings and paste the debug output? you can show the output by clicking this bug icon: Link to comment
favero_ Posted June 30, 2020 Share Posted June 30, 2020 (edited) Hi, right after I press space after trans it redirects me to google or amazon search... Any ideas on how to fix that? here's the debug: [01:12:32.755] Google Translate[Script Filter] Queuing argument '' [01:12:33.573] Google Translate[Script Filter] Script with argv '' finished [01:12:33.574] ERROR: Google Translate[Script Filter] Code 1: { "items": [ { "title": "Error: command.match is not a function", "subtitle": "Activate this item to try again. | ⌘L to see the stack trace", "autocomplete": "", "icon": { "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns" }, "valid": false, "text": { "largetype": "TypeError: command.match is not a function\n at module.exports (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/lib/index.js:16:15)\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:7:21\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:36:3\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:38:3)\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:251206)\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:245054\n at Generator.next (<anonymous>)\n at bl (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:245412)\n at kl (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:247659)\n at Object.u (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:287740)", "copy": "TypeError: command.match is not a function\n at module.exports (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/lib/index.js:16:15)\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:7:21\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:36:3\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:38:3)\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:251206)\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:245054\n at Generator.next (<anonymous>)\n at bl (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:245412)\n at kl (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:247659)\n at Object.u (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:287740)" } } ] } { "items": [ { "title": "/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:1\nError: EACCES: permission denied, open '/Users/marcosfavero/.config/configstore/google-translate-api.json'\nYou don't have access to this file.\n\n at Object.openSync (fs.js:461:3)\n at Object.readFileSync (fs.js:364:35)\n at Configstore.get (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:35:26)\n at new Configstore (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:28:45)\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/@vitalets/google-translate-token/index.js:70:14)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)", "subtitle": "Press ⌘L to see the full error and ⌘C to copy it.", "valid": false, "text": { "copy": "```\n/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:1\nError: EACCES: permission denied, open '/Users/marcosfavero/.config/configstore/google-translate-api.json'\nYou don't have access to this file.\n at Configstore.get (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:35:26)\n at new Configstore (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:28:45)\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/@vitalets/google-translate-token/index.js:70:14)\n```\n\n-\nGoogle Translate 1.4.0\nAlfred 4.1\ndarwin 19.5.0", "largetype": "/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:1\nError: EACCES: permission denied, open '/Users/marcosfavero/.config/configstore/google-translate-api.json'\nYou don't have access to this file.\n at Configstore.get (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:35:26)\n at new Configstore (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:28:45)\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/@vitalets/google-translate-token/index.js:70:14)" }, "icon": { "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns" } } ] } [01:12:33.577] ERROR: Google Translate[Script Filter] JSON error: Garbage at end. in JSON: { "items": [ { "title": "Error: command.match is not a function", "subtitle": "Activate this item to try again. | ⌘L to see the stack trace", "autocomplete": "", "icon": { "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns" }, "valid": false, "text": { "largetype": "TypeError: command.match is not a function\n at module.exports (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/lib/index.js:16:15)\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:7:21\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:36:3\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:38:3)\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:251206)\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:245054\n at Generator.next (<anonymous>)\n at bl (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:245412)\n at kl (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:247659)\n at Object.u (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:287740)", "copy": "TypeError: command.match is not a function\n at module.exports (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/lib/index.js:16:15)\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:7:21\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:36:3\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/index.js:38:3)\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:251206)\n at /usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:245054\n at Generator.next (<anonymous>)\n at bl (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:245412)\n at kl (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:247659)\n at Object.u (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/esm/esm.js:1:287740)" } } ] } { "items": [ { "title": "/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:1\nError: EACCES: permission denied, open '/Users/marcosfavero/.config/configstore/google-translate-api.json'\nYou don't have access to this file.\n\n at Object.openSync (fs.js:461:3)\n at Object.readFileSync (fs.js:364:35)\n at Configstore.get (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:35:26)\n at new Configstore (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:28:45)\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/@vitalets/google-translate-token/index.js:70:14)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)", "subtitle": "Press ⌘L to see the full error and ⌘C to copy it.", "valid": false, "text": { "copy": "```\n/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:1\nError: EACCES: permission denied, open '/Users/marcosfavero/.config/configstore/google-translate-api.json'\nYou don't have access to this file.\n at Configstore.get (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:35:26)\n at new Configstore (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:28:45)\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/@vitalets/google-translate-token/index.js:70:14)\n```\n\n-\nGoogle Translate 1.4.0\nAlfred 4.1\ndarwin 19.5.0", "largetype": "/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:1\nError: EACCES: permission denied, open '/Users/marcosfavero/.config/configstore/google-translate-api.json'\nYou don't have access to this file.\n at Configstore.get (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:35:26)\n at new Configstore (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/configstore/index.js:28:45)\n at Object.<anonymous> (/usr/local/Cellar/node/14.4.0/lib/node_modules/alfred-polyglot/node_modules/@vitalets/google-translate-token/index.js:70:14)" }, "icon": { "path": "/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns" } } ] } Edited June 30, 2020 by favero_ Correct code Link to comment
Kajeh Posted December 14, 2020 Share Posted December 14, 2020 How can I solve this error ? at as.promise.js Link to comment
akanon Posted January 9, 2021 Share Posted January 9, 2021 On 12/15/2020 at 1:36 AM, Kajeh said: How can I solve this error ? at as.promise.js Got the same issue Please advise @Nikersify Link to comment
fred075 Posted January 22, 2021 Share Posted January 22, 2021 😀 Hi there, It took me a while to find this awesome workflow, I compared several ones but this one seems to be the best one. However, whenever I finish installing the NPM package,Restart Alfred, I don't see anything called polyglot. I am kind of tech savvy, but I feel a little stupid. Could someone please guide me and tell me how to actually use this workflow? I am running Alfred 3.8.6, and the NPM installation worked flawlessly. Many thanks🙏 Link to comment
ProRock Posted March 4, 2021 Share Posted March 4, 2021 Hey. Any update with the 403 Error? I have the latest node and npm, ran the install in terminal without sudo, installed with no issues, restarted to be sure all ok, checked that settings pane existed in Alfred - still I get the error every time that I try to use the workflow. Link to comment
MarvinParanoid Posted August 3, 2021 Share Posted August 3, 2021 On 3/4/2021 at 3:25 PM, ProRock said: Hey. Any update with the 403 Error? I have the latest node and npm, ran the install in terminal without sudo, installed with no issues, restarted to be sure all ok, checked that settings pane existed in Alfred - still I get the error every time that I try to use the workflow. Open the Workflow directory in terminal! right click on "Google Translate" by "nikersify" -> "Open in Terminal" execute npm install --save @vitalets/google-translate-api@5.0.0 enjoy your working workflow! Link to comment
milopus Posted November 4, 2021 Share Posted November 4, 2021 On 8/3/2021 at 5:43 PM, MarvinParanoid said: Open the Workflow directory in terminal! right click on "Google Translate" by "nikersify" -> "Open in Terminal" execute npm install --save @vitalets/google-translate-api@5.0.0 enjoy your working workflow! This worked!!! Works like a charm now! Thanks!. 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