question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Webpack hangs the first time it's run on a branch, but starts OK the second time

See original GitHub issue

Describe the bug

(I’ve run into this issue a couple of times, but I don’t think it’s related to #6765.)

In general, webpack works for me (Ubuntu Linux). However, the first time I run start.sh, it does a lot of stuff and prints to the terminal logs that end with the following:

core/templates/dev/head/pages/landing/TopicLandingPage.ts] 4.51 KiB {landing} [built]
    + 476 hidden modules
Child HtmlWebpackCompiler:
     38 assets
    Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
    Entrypoint HtmlWebpackPlugin_1 = __child-HtmlWebpackPlugin_1
    Entrypoint HtmlWebpackPlugin_2 = __child-HtmlWebpackPlugin_2
    Entrypoint HtmlWebpackPlugin_3 = __child-HtmlWebpackPlugin_3
    Entrypoint HtmlWebpackPlugin_4 = __child-HtmlWebpackPlugin_4
    Entrypoint HtmlWebpackPlugin_5 = __child-HtmlWebpackPlugin_5
    Entrypoint HtmlWebpackPlugin_6 = __child-HtmlWebpackPlugin_6
    Entrypoint HtmlWebpackPlugin_7 = __child-HtmlWebpackPlugin_7
    Entrypoint HtmlWebpackPlugin_8 = __child-HtmlWebpackPlugin_8
    Entrypoint HtmlWebpackPlugin_9 = __child-HtmlWebpackPlugin_9
    Entrypoint HtmlWebpackPlugin_10 = __child-HtmlWebpackPlugin_10
    Entrypoint HtmlWebpackPlugin_11 = __child-HtmlWebpackPlugin_11
    Entrypoint HtmlWebpackPlugin_12 = __child-HtmlWebpackPlugin_12
    Entrypoint HtmlWebpackPlugin_13 = __child-HtmlWebpackPlugin_13
    Entrypoint HtmlWebpackPlugin_14 = __child-HtmlWebpackPlugin_14
    Entrypoint HtmlWebpackPlugin_15 = __child-HtmlWebpackPlugin_15
    Entrypoint HtmlWebpackPlugin_16 = __child-HtmlWebpackPlugin_16
    Entrypoint HtmlWebpackPlugin_17 = __child-HtmlWebpackPlugin_17
    Entrypoint HtmlWebpackPlugin_18 = __child-HtmlWebpackPlugin_18
    Entrypoint HtmlWebpackPlugin_19 = __child-HtmlWebpackPlugin_19
    Entrypoint HtmlWebpackPlugin_20 = __child-HtmlWebpackPlugin_20
    Entrypoint HtmlWebpackPlugin_21 = __child-HtmlWebpackPlugin_21
    Entrypoint HtmlWebpackPlugin_22 = __child-HtmlWebpackPlugin_22
    Entrypoint HtmlWebpackPlugin_23 = __child-HtmlWebpackPlugin_23
    Entrypoint HtmlWebpackPlugin_24 = __child-HtmlWebpackPlugin_24
    Entrypoint HtmlWebpackPlugin_25 = __child-HtmlWebpackPlugin_25
    Entrypoint HtmlWebpackPlugin_26 = __child-HtmlWebpackPlugin_26
    Entrypoint HtmlWebpackPlugin_27 = __child-HtmlWebpackPlugin_27
    Entrypoint HtmlWebpackPlugin_28 = __child-HtmlWebpackPlugin_28
    Entrypoint HtmlWebpackPlugin_29 = __child-HtmlWebpackPlugin_29
    Entrypoint HtmlWebpackPlugin_30 = __child-HtmlWebpackPlugin_30
    Entrypoint HtmlWebpackPlugin_31 = __child-HtmlWebpackPlugin_31
    Entrypoint HtmlWebpackPlugin_32 = __child-HtmlWebpackPlugin_32
    Entrypoint HtmlWebpackPlugin_33 = __child-HtmlWebpackPlugin_33
    Entrypoint HtmlWebpackPlugin_34 = __child-HtmlWebpackPlugin_34
    Entrypoint HtmlWebpackPlugin_35 = __child-HtmlWebpackPlugin_35
    Entrypoint HtmlWebpackPlugin_36 = __child-HtmlWebpackPlugin_36
    Entrypoint HtmlWebpackPlugin_37 = __child-HtmlWebpackPlugin_37
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/about/about.html] 23.6 KiB {HtmlWebpackPlugin_2} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/admin/admin.html] 3.88 KiB {HtmlWebpackPlugin_0} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/base.html] 8.57 KiB {HtmlWebpackPlugin_1} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/collection_editor/collection_editor.html] 2.32 KiB {HtmlWebpackPlugin_3} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/collection_player/collection_player.html] 17.2 KiB {HtmlWebpackPlugin_4} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/contact/contact.html] 3.73 KiB {HtmlWebpackPlugin_6} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/creator_dashboard/creator_dashboard.html] 37.7 KiB {HtmlWebpackPlugin_7} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/donate/donate.html] 6.29 KiB {HtmlWebpackPlugin_8} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/email_dashboard/email_dashboard.html] 3.78 KiB {HtmlWebpackPlugin_9} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/email_dashboard/email_dashboard_result.html] 3.78 KiB {HtmlWebpackPlugin_10} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/error/error.html] 3.02 KiB {HtmlWebpackPlugin_11} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/exploration_editor/exploration_editor.html] 9.38 KiB {HtmlWebpackPlugin_12} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/exploration_player/exploration_player.html] 4.15 KiB {HtmlWebpackPlugin_13} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/get_started/get_started.html] 3.6 KiB {HtmlWebpackPlugin_14} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/landing/stewards/landing_page_stewards.html] 29.1 KiB {HtmlWebpackPlugin_30} [built]
        + 26 hidden modules

And then it just hangs. When I go to localhost:8181 the server can’t be found.

However, when I then do Ctrl-C (to kill the process) and run start.sh again, everything works and I can start the server. The last few lines then become:

    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/get_started/get_started.html] 3.6 KiB {HtmlWebpackPlugin_14} [built]
    [./node_modules/html-webpack-plugin/lib/loader.js!./core/templates/dev/head/pages/landing/stewards/landing_page_stewards.html] 29.1 KiB {HtmlWebpackPlugin_30} [built]
        + 26 hidden modules
Starting GAE development server
INFO     2019-05-19 19:26:17,786 devappserver2.py:105] Skipping SDK update check.
INFO     2019-05-19 19:26:17,857 api_server.py:265] Starting API server at: http://localhost:45469
Starting type checking service...
Using 1 worker with 2048MB memory limit

webpack is watching the files…

INFO     2019-05-19 19:26:18,349 dispatcher.py:255] Starting module "default" running at: http://0.0.0.0:8181
INFO     2019-05-19 19:26:18,350 admin_server.py:152] Starting admin server at: http://0.0.0.0:8000

Presumably this behaviour isn’t expected, so I’m filing it as a bug.

To Reproduce Checkout a new branch and run start.sh.

Observed behavior Webpack hangs the first time, and the start.sh process needs to be killed and restarted before a local server is set up.

Expected behavior The local server should launch correctly the first time.

Desktop (please complete the following information; delete this section if the issue does not arise on desktop):

  • OS: Ubuntu
  • Browser: N/A
  • Version: N/A

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
seanlipcommented, Aug 5, 2019

Note: @vojtechjelinek will be making a fix for this today.

0reactions
vojtechjelinekcommented, Jan 13, 2020

@darksun27 Can you post the log of your start command so we can see what exactly is the problem?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack-dev-server runs correctly the first time but returns ...
1 Answer 1 ... You probably has another webpack server running or it was not properly shut down, so the address (127.0.0.1:8080) is...
Read more >
How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >
A Beginner's Guide to Webpack - SitePoint
Learn the core concepts to help you get started with webpack, the popular static module bundler. We'll help you understand how webpack works ......
Read more >
Changelog - Cypress Documentation
Startup time is the time from running a command to when Cypress's window is first opened. Addresses #18480. cy.getCookie() , cy.getCookies() , cy.setCookie()...
Read more >
Webpack - A Detailed Introduction - Smashing Magazine
RequireJS had its first commits in 2009, then Browserify made its debut, ... wasting time on a configuration file is just to run...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found