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.

Demo App Fails Webpack Build

See original GitHub issue

I’m currently unable to build the demo-app project in the /examples directory. Following the included readme, I ran npm install followed by npm start, but I’m receiving the following output. Any ideas? I’m not particularly well-versed in React, so am I missing something obvious?

> @ start /Users/username/Projects/demos/kepler-demo/node_modules/kepler.gl/examples/demo-app
> webpack-dev-server --progress --hot --open

 10% building modules 1/1 modules 0 active
Project is running at http://localhost:8080/
webpack output is served from /
 10% building modules 3/3 modules 0 activewebpack: wait until bundle finished: /
Hash: bfbb95190c60eccaeb52
Version: webpack 2.7.0
Time: 588ms
        Asset    Size  Chunks                    Chunk Names
    bundle.js  351 kB       0  [emitted]  [big]  app
bundle.js.map  413 kB       0  [emitted]         app
chunk    {0} bundle.js, bundle.js.map (app) 321 kB [entry] [rendered]
    [2] (webpack)/hot/emitter.js 77 bytes {0} [built]
    [3] (webpack)-dev-server/client?http://localhost:8080 7.93 kB {0} [built]
    [4] (webpack)/hot/dev-server.js 1.57 kB {0} [built]
    [5] ./src/main.js 369 bytes {0} [built] [failed] [1 error]
    [7] ./~/ansi-regex/index.js 135 bytes {0} [built]
    [8] ./~/events/events.js 8.33 kB {0} [built]
    [9] ./~/html-entities/index.js 231 bytes {0} [built]
   [12] ./~/loglevel/lib/loglevel.js 7.86 kB {0} [built]
   [18] ./~/strip-ansi/index.js 161 bytes {0} [built]
   [19] ./~/url/url.js 23.3 kB {0} [built]
   [21] (webpack)-dev-server/client/overlay.js 3.67 kB {0} [built]
   [22] (webpack)-dev-server/client/socket.js 1.08 kB {0} [built]
   [24] (webpack)/hot nonrecursive ^\.\/log$ 160 bytes {0} [built]
   [25] (webpack)/hot/log-apply-result.js 1.02 kB {0} [built]
   [26] multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js 52 bytes {0} [built]
     + 12 hidden modules

ERROR in ./src/main.js
Module parse failed: /Users/username/Projects/demos/kepler-demo/node_modules/kepler.gl/examples/demo-app/src/main.js Unexpected token (36:2)
You may need an appropriate loader to handle this file type.
|
| const Root = () => (
|   <Provider store={store}>
|     <Router history={history}>
|       <Route path="/(:id)" component={App} />
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/main.js
webpack: Failed to compile.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
maryzamcommented, Jan 26, 2019

Hello, @roqueleal! I quickly checked your repo and found at least one problem: there is no .babelrc file with list of presets to compile source core based on React correctly. Also, bundle.js.map is a file you need only for debugging compiled script and it’ll be generated automatically by webpack if you add devtool:‘source-map’ to the webpack.config (see the original example). But this file does not affect tthe application running or not. Maybe there are some other issues, but I can’t figure out and can only suggest to try start from the begging, because I can assure you that the official example works fine (I’ve just test it).

0reactions
julianheinrichcommented, Apr 17, 2019

Thanks for the hint. If someone finds this thread, the README in the examples is somewhat misleading. I was able to run it by issuing yarn install and yarn start from the root directory of the project. I guess I missed that in the main documentation and jumped right at the demo-app.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Demo App Fails Webpack Build · Issue #101 · keplergl/kepler.gl
I'm currently unable to build the demo-app project in the /examples directory. Following the included readme, I ran npm install followed by ...
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. For example ......
Read more >
Webpack fails to build the example plugin [#3316964] - Drupal
Problem/Motivation This module provides a "starter template" for CKEditor 5 plugins that has all the tooling required to build the example.
Read more >
Webpack build error - javascript - Stack Overflow
I'm facing the same problem on my production environment. I don't know why, but when I upload just the bundle + vendors, built...
Read more >
Development - webpack
webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
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