"npm run build:langfiles" does not work

253 views
Skip to first unread message

Licorne Magique

unread,
Jan 13, 2021, 1:58:18 PM1/13/21
to Blockly

Hello,
I was trying all script one by one (https://developers.google.com/blockly/guides/modify/web/building#uncompressed_mode) of the "Build Scripts" chapter.
But when trying to compile languages, here it what I obtain:

npm run build:langfiles

> blo...@4.20201217.0 build:langfiles
> gulp buildLangfiles

[19:51:51] Using gulpfile B:\Projets\blockly-4.20201217.0\gulpfile.js
[19:51:51] Starting 'buildLangfiles'...
[19:51:51] 'buildLangfiles' errored after 393 ms
[19:51:51] Error: Command failed: python ./scripts/i18n/js_to_json.py --input_file msg\messages.js --output_dir msg\json --quiet
    at checkExecSyncError (node:child_process:680:11)
    at execSync (node:child_process:717:15)
    at buildLangfiles (B:\Projets\blockly-4.20201217.0\scripts\gulpfiles\build_tasks.js:421:3)
    at buildLangfiles (B:\Projets\blockly-4.20201217.0\node_modules\undertaker\lib\set-task.js:13:15)
    at bound (node:domain:416:15)
    at runBound (node:domain:427:12)
    at asyncRunner (B:\Projets\blockly-4.20201217.0\node_modules\async-done\index.js:55:18)
    at processTicksAndRejections (node:internal/process/task_queues:75:11)
npm ERR! code 1
npm ERR! path B:\Projets\blockly-4.20201217.0
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c gulp buildLangfiles

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\babas\AppData\Local\npm-cache\_logs\2021-01-13T18_51_51_692Z-debug.log

Any idea?
Many thanks!

Maribeth Bottorff

unread,
Jan 22, 2021, 7:56:52 PM1/22/21
to Blockly
Sorry for not getting back to you sooner. I tried to reproduce this on both blockly master and develop and didn't have any errors. Could you share the contents of the debug log so we can see if there's something going on?
Did you have any changes that may have affected this?

Licorne Magique

unread,
Jan 24, 2021, 7:25:04 PM1/24/21
to Blockly
Hi,
thanks for answering. I work on WIndows 10x64, with node15.6.0 and npm 7.4.0. I downloaded a fresh source code from github, and it's the same pb.

Here's the debug log:
0 verbose cli [
0 verbose cli   'C:\\Program Files\\nodejs\\node.exe',
0 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
0 verbose cli   'run',
0 verbose cli   'build:langfiles'
0 verbose cli ]
1 info using n...@7.4.0
2 info using no...@v15.6.0
3 timing config:load:defaults Completed in 3ms
4 timing config:load:file:C:\Program Files\nodejs\node_modules\npm\npmrc Completed in 4ms
5 timing config:load:builtin Completed in 4ms
6 timing config:load:cli Completed in 1ms
7 timing config:load:env Completed in 2ms
8 timing config:load:file:B:\Bureau\blockly-4.20201217.0\.npmrc Completed in 1ms
9 timing config:load:project Completed in 1ms
10 timing config:load:file:C:\Users\babas\.npmrc Completed in 0ms
11 timing config:load:user Completed in 0ms
12 timing config:load:file:C:\Users\babas\AppData\Roaming\npm\etc\npmrc Completed in 1ms
13 timing config:load:global Completed in 1ms
14 timing config:load:cafile Completed in 0ms
15 timing config:load:validate Completed in 2ms
16 timing config:load:setUserAgent Completed in 1ms
17 timing config:load:setEnvs Completed in 1ms
18 timing config:load Completed in 16ms
19 verbose npm-session 468d36f8419dbd94
20 timing npm:load Completed in 28ms
21 timing command:run-script Completed in 2151ms
22 verbose stack Error: command failed
22 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\@npmcli\promise-spawn\index.js:64:27)
22 verbose stack     at ChildProcess.emit (node:events:379:20)
22 verbose stack     at maybeClose (node:internal/child_process:1065:16)
22 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:296:5)
23 verbose pkgid blo...@4.20201217.0
24 verbose cwd B:\Bureau\blockly-4.20201217.0
25 verbose Windows_NT 10.0.18363
26 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build:langfiles"
27 verbose node v15.6.0
28 verbose npm  v7.4.0
29 error code 1
30 error path B:\Bureau\blockly-4.20201217.0
31 error command failed
32 error command C:\Windows\system32\cmd.exe /d /s /c gulp buildLangfiles
33 verbose exit 1

Abby Schmiedt

unread,
Jan 26, 2021, 4:28:13 PM1/26/21
to Blockly
Hello!

I tested on a windows computer using windows 10 and did not have any problems, however I was using node v14 and so was not able to completely replicate your situation. 

Just a few questions before I open a bug to investigate more:
1. Just wanted to double check that you ran npm install? 
2. It looks like the problem had to do with running a python script. Do you have python installed on your machine? If so, what version? 
3. You said you tried the rest of the commands. Did you have any problems when you ran npm run build? The reason I am asking is because we run the build lang files script when running npm run build, so I am curious you would have a problem while running npm run build:langfiles and not have a problem while running npm run build.

Thanks!
Abby 

Licorne Magique

unread,
Feb 2, 2021, 9:17:36 AM2/2/21
to Blockly
Hi Abby,
thanks for answering. So I try to sort information:
  • French WIndows 10x64 Entreprise
  • npm 7.4.3
  • python 2.7 (from windows-build-tools)
And sorry for my explanation, I was trying all scripts one by one, so not to use " npm run build". And of course you're right it does not work.
Thanks for your help.
Reply all
Reply to author
Forward
0 new messages