Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

translation-sync fails #1066

Closed
TBuc opened this issue Apr 23, 2017 · 4 comments
Closed

translation-sync fails #1066

TBuc opened this issue Apr 23, 2017 · 4 comments

Comments

@TBuc
Copy link

TBuc commented Apr 23, 2017

Expected behavior:
The execution of the following script runs errorless:
npm run translation-sync
Actual behavior:
Script execution almost immediately hangs with error.
Steps to reproduce:
0. Install Node.js (complete of npm)

  1. Clone hospitalrun-fronted git repo.
  2. Switch to project's basedir
  3. run npm install -g ember-cli@latest
  4. run npm install -g babel-cli eslint-cli
  5. run npm install -g bower
  6. run npm install
  7. run npm run translation-sync

Screenshots (if applicable):
Content of npm-debug.log (personal info snipped and replaced by [...]):

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'translation-sync' ]
2 info using npm@3.10.10
3 info using node@v6.10.2
4 verbose run-script [ 'pretranslation-sync',
4 verbose run-script   'translation-sync',
4 verbose run-script   'posttranslation-sync' ]
5 info lifecycle hospitalrun@0.9.18~pretranslation-sync: hospitalrun@0.9.18
6 silly lifecycle hospitalrun@0.9.18~pretranslation-sync: no script for pretranslation-sync, continuing
7 info lifecycle hospitalrun@0.9.18~translation-sync: hospitalrun@0.9.18
8 verbose lifecycle hospitalrun@0.9.18~translation-sync: unsafe-perm in lifecycle true
9 verbose lifecycle hospitalrun@0.9.18~translation-sync: PATH: C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\[...]\hospitalrun-frontend\node_modules\.bin;C:\Program Files\nodejs;C:\Users\[...]\appdata\Roaming\npm;[...]
10 verbose lifecycle hospitalrun@0.9.18~translation-sync: CWD: C:\Users\[...]\hospitalrun-frontend
11 silly lifecycle hospitalrun@0.9.18~translation-sync: Args: [ '/d /s /c',
11 silly lifecycle   'babel-node script/translation/sync.js  --presets es2015,stage-2; eslint --fix app/locales' ]
12 silly lifecycle hospitalrun@0.9.18~translation-sync: Returned: code: 1  signal: null
13 info lifecycle hospitalrun@0.9.18~translation-sync: Failed to exec translation-sync script
14 verbose stack Error: hospitalrun@0.9.18 translation-sync: `babel-node script/translation/sync.js  --presets es2015,stage-2; eslint --fix app/locales`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:886:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid hospitalrun@0.9.18
16 verbose cwd C:\Users\[...]\hospitalrun-frontend
17 error Windows_NT 10.0.14393
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "translation-sync"
19 error node v6.10.2
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error hospitalrun@0.9.18 translation-sync: `babel-node script/translation/sync.js  --presets es2015,stage-2; eslint --fix app/locales`
22 error Exit status 1
23 error Failed at the hospitalrun@0.9.18 translation-sync script 'babel-node script/translation/sync.js  --presets es2015,stage-2; eslint --fix app/locales'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the hospitalrun package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     babel-node script/translation/sync.js  --presets es2015,stage-2; eslint --fix app/locales
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs hospitalrun
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls hospitalrun
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

OS and Browser:
Windows 10 Pro x64

I've been trying to solve this for a few hours without succeeding - but this is my very first experience with Node.js world.
Please note that I've tried with both npm package babel-preset-stage-2 versions v.6.18.0 and v.6.24.1, both resulting in the same error.

Thank you in advice for helping.

@mqchau
Copy link
Contributor

mqchau commented Apr 23, 2017

Hi,
I am the author of the script, I will investigate this. I don't have Windows 10 laptop so I'll have to borrow from someone.

@mqchau
Copy link
Contributor

mqchau commented Apr 23, 2017

So apparent Windows has issue with ;. On MacOS the ; symbol is understood as separation of 2 commands while Windows thinks it's 1 command all along. The solution is to change ; into &&. I will create a PR to make some changes to fix the instruction as well as the script. Please test it out when you have the chance.

@mqchau
Copy link
Contributor

mqchau commented Apr 23, 2017

@TBuc Please follow the new instruction and see if you can run it. I have tested it on a borrowed Windows 10 laptop and it worked.

@TBuc
Copy link
Author

TBuc commented Apr 24, 2017

@mqchau perfect, now works fine!
Please just note that I needed to install npm package babel-preset-es2015 locally in order to make it work (while babel-cli eslint-cli worked fine being installed globally).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants