"npm run dist" can NOT work !
See original GitHub issueExpected Behavior
“npm start” is OK, When I run “npm run dist” ,got error like this:
` + 1 hidden module
scratch-desktop@3.14.0 fetch E:\steam\scratch\scratch_git\scratch3\scratch-desktop
rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMediaLibraryAssets.js
Total library assets: 1331
events.js:292
throw er; // Unhandled ‘error’ event
^
Error: connect ETIMEDOUT 31.13.77.33:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
Emitted ‘error’ event on ClientRequest instance at:
at TLSSocket.socketErrorListener (_http_client.js:426:9)
at TLSSocket.emit (events.js:315:20)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: ‘ETIMEDOUT’,
code: ‘ETIMEDOUT’,
syscall: ‘connect’,
address: ‘31.13.77.33’,
port: 443
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scratch-desktop@3.14.0 fetch: rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMed iaLibraryAssets.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scratch-desktop@3.14.0 fetch 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! C:\Users\mkygogo\AppData\Roaming\npm-cache_logs\2020-08-18T12_06_07_808Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scratch-desktop@3.14.0 dist: npm run clean && npm run compile && npm run fetch && npm run doBuild -- --mode =dist
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scratch-desktop@3.14.0 dist 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! C:\Users\mkygogo\AppData\Roaming\npm-cache_logs\2020-08-18T12_06_07_856Z-debug.log
`
and the two log files:
### 2020-08-18T12_06_07_808Z-debug.log:
0 info it worked if it ends with ok 1 verbose cli [ 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 ‘fetch’ 1 verbose cli ] 2 info using npm@6.14.6 3 info using node@v12.18.3 4 verbose run-script [ ‘prefetch’, ‘fetch’, ‘postfetch’ ] 5 info lifecycle scratch-desktop@3.14.0~prefetch: scratch-desktop@3.14.0 6 info lifecycle scratch-desktop@3.14.0~fetch: scratch-desktop@3.14.0 7 verbose lifecycle scratch-desktop@3.14.0~fetch: unsafe-perm in lifecycle true 8 verbose lifecycle scratch-desktop@3.14.0~fetch: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\steam\scratch\scratch_git\scratch3\scratch-desktop\node_modules.bin;C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\steam\scratch\scratch_git\scratch3\scratch-desktop\node_modules.bin;E:\steam\scratch\scratch_git\cmder\vendor\bin;E:\steam\scratch\scratch_git\cmder\vendor\git-for-windows\cmd;E:\steam\scratch\scratch_git\cmder\vendor\conemu-maximus5\ConEmu\Scripts;E:\steam\scratch\scratch_git\cmder\vendor\conemu-maximus5;E:\steam\scratch\scratch_git\cmder\vendor\conemu-maximus5\ConEmu;C:\Python38\Scripts;C:\Python38;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Users\mkygogo\AppData\Local\Microsoft\WindowsApps;C:\Users\mkygogo\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\mkygogo\AppData\Roaming\npm;E:\steam\scratch\scratch_git\cmder\vendor\git-for-windows\mingw64\bin;E:\steam\scratch\scratch_git\cmder\vendor\git-for-windows\usr\bin;E:\steam\scratch\scratch_git\cmder 9 verbose lifecycle scratch-desktop@3.14.0~fetch: CWD: E:\steam\scratch\scratch_git\scratch3\scratch-desktop 10 silly lifecycle scratch-desktop@3.14.0~fetch: Args: [ 10 silly lifecycle ‘/d /s /c’, 10 silly lifecycle ‘rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMediaLibraryAssets.js’ 10 silly lifecycle ] 11 silly lifecycle scratch-desktop@3.14.0~fetch: Returned: code: 1 signal: null 12 info lifecycle scratch-desktop@3.14.0~fetch: Failed to exec fetch script 13 verbose stack Error: scratch-desktop@3.14.0 fetch:
rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMediaLibraryAssets.js
13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 14 verbose pkgid scratch-desktop@3.14.0 15 verbose cwd E:\steam\scratch\scratch_git\scratch3\scratch-desktop 16 verbose Windows_NT 10.0.18362 17 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” “fetch” 18 verbose node v12.18.3 19 verbose npm v6.14.6 20 error code ELIFECYCLE 21 error errno 1 22 error scratch-desktop@3.14.0 fetch:rimraf ./static/assets/ && mkdirp ./static/assets/ && node ./scripts/fetchMediaLibraryAssets.js
22 error Exit status 1 23 error Failed at the scratch-desktop@3.14.0 fetch script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]
### 2020-08-18T12_06_07_856Z-debug.log
0 info it worked if it ends with ok 1 verbose cli [ 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 ‘dist’ 1 verbose cli ] 2 info using npm@6.14.6 3 info using node@v12.18.3 4 verbose run-script [ ‘predist’, ‘dist’, ‘postdist’ ] 5 info lifecycle scratch-desktop@3.14.0~predist: scratch-desktop@3.14.0 6 info lifecycle scratch-desktop@3.14.0~dist: scratch-desktop@3.14.0 7 verbose lifecycle scratch-desktop@3.14.0~dist: unsafe-perm in lifecycle true 8 verbose lifecycle scratch-desktop@3.14.0~dist: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;E:\steam\scratch\scratch_git\scratch3\scratch-desktop\node_modules.bin;E:\steam\scratch\scratch_git\cmder\vendor\bin;E:\steam\scratch\scratch_git\cmder\vendor\git-for-windows\cmd;E:\steam\scratch\scratch_git\cmder\vendor\conemu-maximus5\ConEmu\Scripts;E:\steam\scratch\scratch_git\cmder\vendor\conemu-maximus5;E:\steam\scratch\scratch_git\cmder\vendor\conemu-maximus5\ConEmu;C:\Python38\Scripts;C:\Python38;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\nodejs;C:\ProgramData\chocolatey\bin;C:\Users\mkygogo\AppData\Local\Microsoft\WindowsApps;C:\Users\mkygogo\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\mkygogo\AppData\Roaming\npm;E:\steam\scratch\scratch_git\cmder\vendor\git-for-windows\mingw64\bin;E:\steam\scratch\scratch_git\cmder\vendor\git-for-windows\usr\bin;E:\steam\scratch\scratch_git\cmder 9 verbose lifecycle scratch-desktop@3.14.0~dist: CWD: E:\steam\scratch\scratch_git\scratch3\scratch-desktop 10 silly lifecycle scratch-desktop@3.14.0~dist: Args: [ 10 silly lifecycle ‘/d /s /c’, 10 silly lifecycle ‘npm run clean && npm run compile && npm run fetch && npm run doBuild – --mode=dist’ 10 silly lifecycle ] 11 silly lifecycle scratch-desktop@3.14.0~dist: Returned: code: 1 signal: null 12 info lifecycle scratch-desktop@3.14.0~dist: Failed to exec dist script 13 verbose stack Error: scratch-desktop@3.14.0 dist:
npm run clean && npm run compile && npm run fetch && npm run doBuild -- --mode=dist
13 verbose stack Exit status 1 13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) 13 verbose stack at EventEmitter.emit (events.js:315:20) 13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:315:20) 13 verbose stack at maybeClose (internal/child_process.js:1021:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) 14 verbose pkgid scratch-desktop@3.14.0 15 verbose cwd E:\steam\scratch\scratch_git\scratch3\scratch-desktop 16 verbose Windows_NT 10.0.18362 17 verbose argv “C:\Program Files\nodejs\node.exe” “C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js” “run” “dist” 18 verbose node v12.18.3 19 verbose npm v6.14.6 20 error code ELIFECYCLE 21 error errno 1 22 error scratch-desktop@3.14.0 dist:npm run clean && npm run compile && npm run fetch && npm run doBuild -- --mode=dist
22 error Exit status 1 23 error Failed at the scratch-desktop@3.14.0 dist script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 1, true ]
Operating System and Browser
Windows 10
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (7 by maintainers)
Top GitHub Comments
If you can, try proxy or VPN. This is probably the result of China government blocking Scratch.
See also #153