resolve
resolve copied to clipboard
Allow to disable open browser in watch mode
Is your feature request related to a problem? Please describe.
I can not start the application in dev mode via Docker, because it tries to open the browser via xdg-open
which fails.
resolve_1 | Following environment variables will be sent into browser:
resolve_1 | * RESOLVE_UPLOADER_CDN_URL
resolve_1 | * RESOLVE_UPLOADER_CDN_URL
resolve_1 |
resolve_1 | [ Shared client ESM chunks ] Time: 3028ms
resolve_1 | Built at: 10/18/2021 9:21:56 AM
resolve_1 | [ Client IIFE entries ] Time: 2725ms
resolve_1 | Built at: 10/18/2021 9:21:56 AM
resolve_1 | [ Server local entry point ] Time: 1592ms
resolve_1 | Built at: 10/18/2021 9:21:55 AM
resolve_1 | [ Shared server ESM chunks ] Time: 441ms
resolve_1 | Built at: 10/18/2021 9:21:54 AM
resolve_1 | 2021-10-18T09:21:56.893Z resolve:scripts:watch open: true
resolve_1 | Server is still loading - please wait...
resolve_1 | Application listening on port 3000!
resolve_1 |
resolve_1 | You can now view ts-resolve-playground in the browser.
resolve_1 |
resolve_1 | Local: http://localhost:3000/
resolve_1 | On Your Network: http://172.31.0.2:3000/
resolve_1 |
resolve_1 | Note that the development build is not optimized.
resolve_1 | To create a production build, use:
resolve_1 | npm run build.
resolve_1 | npm start.
resolve_1 |
resolve_1 | events.js:352
resolve_1 | throw er; // Unhandled 'error' event
resolve_1 | ^
resolve_1 |
resolve_1 | Error: spawn xdg-open ENOENT
resolve_1 | at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
resolve_1 | at onErrorNT (internal/child_process.js:467:16)
resolve_1 | at processTicksAndRejections (internal/process/task_queues.js:82:21)
resolve_1 | Emitted 'error' event on ChildProcess instance at:
resolve_1 | at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
resolve_1 | at onErrorNT (internal/child_process.js:467:16)
resolve_1 | at processTicksAndRejections (internal/process/task_queues.js:82:21) {
resolve_1 | errno: -2,
resolve_1 | code: 'ENOENT',
resolve_1 | syscall: 'spawn xdg-open',
resolve_1 | path: 'xdg-open',
resolve_1 | spawnargs: [ 'http://localhost:3000/' ]
resolve_1 | }
resolve_1 | npm ERR! code ELIFECYCLE
resolve_1 | npm ERR! errno 1
resolve_1 | npm ERR! [email protected] dev: `babel-node run.js dev`
resolve_1 | npm ERR! Exit status 1
resolve_1 | npm ERR!
resolve_1 | npm ERR! Failed at the [email protected] dev script.
resolve_1 | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
resolve_1 |
resolve_1 | npm ERR! A complete log of this run can be found in:
resolve_1 | npm ERR! /home/node/.npm/_logs/2021-10-18T09_21_59_003Z-debug.log
Describe the solution you'd like
Check if the env variable process.env.RESOLVE_SERVER_OPEN_BROWSER
is set and if so, use this value.