Jump to content

Polyglot - yet another Google Translate workflow


Recommended Posts

@Xusqui

 

I've pushed a version of the workflow that should throw a more verbose error, I'm not really confident that it will help but it's always something.

You can install it by running the following commands:

$ npm rm -g alfred-polyglot
$ npm i -g nikersify/alfred-polyglot#verbose-errors

Looking forward for your report, thanks in advance!

Link to comment

I've tried...

 

 

It took quite a bit, but it installed:

 

Quote

iMac:~ franciscofernandezcano$ npm i -g nikersify/alfred-polyglot#verbose-errors

 

> alfred-polyglot@1.2.1 postinstall /Users/franciscofernandezcano/.npm-global/lib/node_modules/alfred-polyglot

> alfy-init

 

+ alfred-polyglot@1.2.1

added 148 packages from 59 contributors in 108.356s

iMac:~ franciscofernandezcano$

 

Now, instead, I have a forbidden 403 error...

 

Your script doesn't like my computer :D

Link to comment

It's very weird!!!

 

I Installed the new version... AND IT WORKED... for a couple of times... After that, I get again the same error...1083492725_Capturadepantalla2018-12-06alas6_43_27.thumb.jpg.0a2cf7f9443d3559e76403eb897fb6c7.jpg

 

I uninstalled and installed again but no way...

 

Thank you very very much!

 

--- EDITED ---

 

FYI I've tried tons of translators workflows (even one installed also via npm [can't remember the name, but something like ultimate-google-translator or something like that]), and none has ever worked out... This morning I tried this simple one and is the only one that has worked on my computer.

Edited by Xusqui
Add info
Link to comment
  • 1 month later...

Hi there, 

 

I'm having this issue, could you take a look? I have tried all the different commands from page 1

 

3901 verbose stack Error: alfred-polyglot@1.2.1 postinstall: `alfy-init`
3901 verbose stack Exit status 1
3901 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
3901 verbose stack     at EventEmitter.emit (events.js:189:13)
3901 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
3901 verbose stack     at ChildProcess.emit (events.js:189:13)
3901 verbose stack     at maybeClose (internal/child_process.js:970:16)
3901 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
3902 verbose pkgid alfred-polyglot@1.2.1
3903 verbose cwd /Users/y_lu
3904 verbose Darwin 18.2.0
3905 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "-g" "nikersify/alfred-polyglot#client-gtk"
3906 verbose node v10.15.1
3907 verbose npm  v6.4.1
3908 error code ELIFECYCLE
3909 error errno 1
3910 error alfred-polyglot@1.2.1 postinstall: `alfy-init`
3910 error Exit status 1
3911 error Failed at the alfred-polyglot@1.2.1 postinstall script.
3911 error This is probably not a problem with npm. There is likely additional logging output above.
3912 verbose exit [ 1, true ]

 

 

Thanks!

Link to comment
4 hours ago, Nikersify said:

@mikeylu Are you running the install comand with `sudo`?

Yes I am @Nikersify

 

MVALT27:~ y_lu$ node -v

v10.15.1

MVALT27:~ y_lu$ sudo npm rm -g alfred-polyglot

Password:

up to date in 0.04s

MVALT27:~ y_lu$ sudo npm i -g nikersify/alfred-polyglot#client-gtk

 

> alfred-polyglot@1.2.1 postinstall /usr/local/lib/node_modules/alfred-polyglot

> alfy-init

 

{ Error: Command failed: alfred-link

Error: Alfred preferences not found at location /Users/y_lu/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist

    at pathExists.then.exists (/usr/local/lib/node_modules/alfred-polyglot/node_modules/resolve-alfred-prefs/index.js:15:10)

 

    at Promise.all.then.arr (/usr/local/lib/node_modules/alfred-polyglot/node_modules/execa/index.js:201:11)

    at process._tickCallback (internal/process/next_tick.js:68:7)

  code: 1,

  killed: false,

  stdout: '',

  stderr:

   'Error: Alfred preferences not found at location /Users/y_lu/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n    at pathExists.then.exists (/usr/local/lib/node_modules/alfred-polyglot/node_modules/resolve-alfred-prefs/index.js:15:10)\n',

  failed: true,

  signal: null,

  cmd: 'alfred-link',

  timedOut: false }

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! alfred-polyglot@1.2.1 postinstall: `alfy-init`

npm ERR! Exit status 1

npm ERR! 

npm ERR! Failed at the alfred-polyglot@1.2.1 postinstall script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

 

npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/y_lu/.npm/_logs/2019-01-30T21_18_24_284Z-debug.log

 

Screen Shot 2019-01-30 at 4.19.04 PM.png

Edited by mikeylu
Removed image
Link to comment
7 minutes ago, mikeylu said:

Error: Alfred preferences not found at location /Users/y_lu/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist

 

The alfy library can't find your Alfred preferences file (it's trying to find the directory where your workflows are installed, IIRC). Does that file exist at that path?

 

Also, please don't post screenshots of text messages in Terminal. Just post the text.

Link to comment

Yes it is there:

Here is the path

/Users/y_lu/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist

 

And here is the actual file:

 

 

bplist00�	

Ubuild_themeEditorBackground_!NSNavPanelExpandedSizeForOpenMode_ NSWindow Frame alfredprefswindow\lastTabBuild_0NSSplitView Subview Frames NSColorPanelSplitView_.NSToolbar Configuration com.apple.NSColorPanel_NSNavLastRootDirectoryWlastTab_NSWindow Frame NSColorPanel�_High Sierra.jpgZ{750, 480}_330 328 1100 662 0 0 1680 1027 �_20.000000, 0.000000, 224.000000, 263.000000, NO, NO_30.000000, 264.000000, 224.000000, 43.000000, NO, NO�[TB Is Shown_/Volumes/OTA/MarketingXadvanced_0 158 224 280 0 0 1680 1027 #;_����25GRtw�����4

 

Edited by mikeylu
Link to comment
4 hours ago, deanishe said:

We don't need the contents of the file (it's binary anyway, not text).

 

In any case, the issue appears to be with alfy. Perhaps @Nikersify has a regular build of the workflow that installs like a real workflow instead of using alfy's stupid npm -g installation method (which is what's causing the issue).

Ah, perfect, thank you for your help! Hope the OP has a solution!

Link to comment

@mikeylu You should be running the install command without sudo, so just like in the instructions:

$ npm i -g alfred-polyglot

If you get errors follow this https://github.com/sindresorhus/guides/blob/master/npm-global-without-sudo.md. If that's too hard there is a link to an old-ish build of the workflow that you can just install using double click in the first post (I don't provide support for that method though). Good luck!

Link to comment
  • 2 weeks later...

Hello,

 

I'm very interested with this Workflow and after reading all posts here, I've tried to install it.

 

Bur I've got this issue :/

 

What's going wrong ?

 

jlmretina:~ jlm$ npm i -g alfred-polyglot

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules

npm ERR! path /usr/local/lib/node_modules

npm ERR! code EACCES

npm ERR! errno -13

npm ERR! syscall access

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:

npm ERR!    '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! 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 (though this is not recommended).

 

npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/joellelemoan 1/.npm/_logs/2019-02-17T10_02_56_305Z-debug.log

jlmretina:~ jlm$ node -v

v10.15.1

jlmretina:~ jlm$ npm -v

6.4.1

Link to comment

Thank a lot for your reply @Nikersify but I'm not really sure to understand what I must do… :/

 

Here what I've done:

 

jlmretina:~ jlm$  $ npm i -g alfred-polyglot

-bash: $: command not found

jlmretina:~ jlm$ mkdir "${HOME}/.npm-packages"

jlmretina:~ jlm$ prefix=${HOME}/.npm-packages

jlmretina:~ jlm$ NPM_PACKAGES="${HOME}/.npm-packages"

jlmretina:~ jlm$ export PATH="$NPM_PACKAGES/bin:$PATH"

jlmretina:~ jlm$ unset MANPATH

jlmretina:~ jlm$ export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"

 

Then in a new Tab…

 

jlmretina:~ jlm$ $ npm i -g alfred-polyglot

-bash: $: command not found

jlmretina:~ jlm$ npm i -g alfred-polyglot

npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules

npm ERR! path /usr/local/lib/node_modules

npm ERR! code EACCES

npm ERR! errno -13

npm ERR! syscall access

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:

npm ERR!    '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! 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 (though this is not recommended).

 

npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/joellelemoan 1/.npm/_logs/2019-02-17T11_04_39_960Z-debug.log

 

Sorry if I made stupid thing, but long time ago I haven't use Terminal and I think I'm a little bit lost. 😕

 

Link to comment
3 minutes ago, Gavzel said:

jlmretina:~ jlm$  $ npm i -g alfred-polyglot

-bash: $: command not found

jlmretina:~ jlm$ mkdir "${HOME}/.npm-packages"

jlmretina:~ jlm$ prefix=${HOME}/.npm-packages

jlmretina:~ jlm$ NPM_PACKAGES="${HOME}/.npm-packages"

jlmretina:~ jlm$ export PATH="$NPM_PACKAGES/bin:$PATH"

jlmretina:~ jlm$ unset MANPATH

jlmretina:~ jlm$ export MANPATH="$NPM_PACKAGES/share/man:$(manpath)"

 

Then in a new Tab…

 

All those variables you've set are only valid in that particular shell session. They will not be available in a new tab.

 

To set them permanently, you have to add them to your .bashrc (or .bash_profile — I'm not sure, as I don't use bash).

 

In any case, you'll need to use sudo to install the workflow.


You shouldn't use sudo npm, but it looks like you've used it before, so now the directory belongs to root and you'll have to use sudo every time you use npm install -g.

Link to comment

Thanks @deanishe.

But it looks like I'm turning around… 😕

 

jlmretina:~ jlm$ sudo npm install -g alfred-polyglot

 

> alfred-polyglot@1.2.1 postinstall /usr/local/lib/node_modules/alfred-polyglot

> alfy-init

 

{ Error: Command failed: alfred-link

Error: Alfred preferences not found at location /Users/joellelemoan 1/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist

    at pathExists.then.exists (/usr/local/lib/node_modules/alfred-polyglot/node_modules/resolve-alfred-prefs/index.js:15:10)

 

    at Promise.all.then.arr (/usr/local/lib/node_modules/alfred-polyglot/node_modules/execa/index.js:201:11)

    at process._tickCallback (internal/process/next_tick.js:68:7)

  code: 1,

  killed: false,

  stdout: '',

  stderr:

   'Error: Alfred preferences not found at location /Users/joellelemoan 1/Library/Preferences/com.runningwithcrayons.Alfred-Preferences-3.plist\n    at pathExists.then.exists (/usr/local/lib/node_modules/alfred-polyglot/node_modules/resolve-alfred-prefs/index.js:15:10)\n',

  failed: true,

  signal: null,

  cmd: 'alfred-link',

  timedOut: false }

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR! alfred-polyglot@1.2.1 postinstall: `alfy-init`

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the alfred-polyglot@1.2.1 postinstall script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

 

npm ERR! A complete log of this run can be found in:

npm ERR!     /Users/joellelemoan 1/.npm/_logs/2019-02-17T11_34_09_232Z-debug.log

 

Even if I try to read again previous post, I d'on't understand what to do.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...