Jump to content
Nikersify

Polyglot - yet another Google Translate workflow

Recommended Posts

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

Share this post


Link to post

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$

 

 

 

Share this post


Link to post
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 by deanishe

Share this post


Link to post

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 ~ %

 

Share this post


Link to post
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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...