Deck.gl: Cannot find module 'webpack' error in examples

Created on 20 Jun 2017  路  8Comments  路  Source: visgl/deck.gl

I'm hitting the following issue when trying to run the examples which include webpack (in particular i've tried geojson and hello-world-webpack2)

npm run start
> @ start /home/david/git/deck.gl/examples/geojson
> webpack-dev-server --progress --hot --port 3030 --open

module.js:472
    throw err;
    ^

Error: Cannot find module 'webpack'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/david/git/deck.gl/examples/webpack.config.local.js:10:17)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)

Full logs:
npm-debug.txt


I've tried pretty much every suggestion from these two posts (uninstalling locally/globally, re-installing globally, installing with --save-local):
https://stackoverflow.com/questions/29492240/error-cannot-find-module-webpack
https://stackoverflow.com/questions/36393969/error-cannot-find-module-webpack

I'm running ubuntu 16.04
node v7.5.0
npm v4.1.2

P0

Most helpful comment

@deejep That error normally means that you have another dev server running on that port

Try pkill -9 node or killall node in your console if you can't find the offender.

All 8 comments

@katzdave you need to install in the root directory as well. This is a known bug that we plan to address soon.

Awesome that fixed this issue for me, thanks for the quick response :).

When I npm start from the root directory, I only got an example of San Francisco. How to run the examples then ?

@Deejep Each example is a stand-alone directory with its own package.json (the intention is that you should be able to copy an example directory and use as a starting point for your own apps).

So you need to cd into each example, install and start.

Some of the examples are on the home page (deck.gl) as part of the docs, and that can be run from the demo folder.

@ibgreen I have tried this actually. The install command works, but not the start where I got the following error:

> webpack-dev-server --progress --hot --port 3030 --open

 10% building modules 1/1 modules 0 activeevents.js:141                            
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE 127.0.0.1:3030
    at Object.exports._errnoException (util.js:870:11)
    at exports._exceptionWithHostPort (util.js:893:20)
    at Server._listen2 (net.js:1237:14)
    at listen (net.js:1273:10)
    at net.js:1382:9
    at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:63:16)
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:82:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ start: `webpack-dev-server --progress --hot --port 3030 --open`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@deejep That error normally means that you have another dev server running on that port

Try pkill -9 node or killall node in your console if you can't find the offender.

pkill -9 node worked ! thx!

Thanks A Lot..

Was this page helpful?
0 / 5 - 0 ratings