grommet / grommet-cli

Deprecated, use create-react-app for v2 instead. Command Line interface for grommet
Apache License 2.0
28 stars 18 forks source link

grommet sample app not starting #32

Closed Davst closed 7 years ago

Davst commented 7 years ago

The grommet-cli creates an app that won't start.

npm run dev-server starts, but npm run dev returns:

> sample-app@0.1.0 dev /Users/david/Code/gromtest/sample-app
> cross-env NODE_ENV=development grommet pack

[grommet:pack]: Running webpack...
[grommet:pack]: Starting dev server...
events.js:163
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::3000
    at Object.exports._errnoException (util.js:1050:11)
    at exports._exceptionWithHostPort (util.js:1073:20)
    at Server.setupListenHandle [as _listen2] (net.js:1263:14)
    at listenInCluster (net.js:1304:12)
    at Server.listen (net.js:1402:7)
    at Server.listen (/Users/david/Code/gromtest/sample-app/node_modules/webpack-dev-server/lib/Server.js:394:47)
    at runDevServer (/Users/david/Code/gromtest/sample-app/node_modules/grommet-cli/bin/commands/pack.js:92:13)
    at startServer (/Users/david/Code/gromtest/sample-app/node_modules/grommet-cli/bin/commands/pack.js:164:9)
    at /Users/david/Code/gromtest/sample-app/node_modules/grommet-cli/bin/commands/pack.js:178:9
    at build (/Users/david/Code/gromtest/sample-app/node_modules/grommet-cli/bin/commands/pack.js:100:10)
    at /Users/david/Code/gromtest/sample-app/node_modules/grommet-cli/bin/commands/pack.js:232:14

npm ERR! Darwin 16.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "dev"
npm ERR! node v7.9.0
npm ERR! npm  v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sample-app@0.1.0 dev: `cross-env NODE_ENV=development grommet pack`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sample-app@0.1.0 dev script 'cross-env NODE_ENV=development grommet pack'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the sample-app package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=development grommet pack
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sample-app
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sample-app
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/david/.npm/_logs/2017-04-20T22_29_58_838Z-debug.log
Aura:sample-app david$ node update
module.js:472
    throw err;
    ^

Error: Cannot find module '/Users/david/Code/gromtest/sample-app/update'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.runMain (module.js:605:10)
    at run (bootstrap_node.js:423:7)
    at startup (bootstrap_node.js:147:9)
    at bootstrap_node.js:538:3
alansouzati commented 7 years ago

this usually means you have another service running at localhost:3000. Can you update your webpack devServer config object to use a different port?

For example:

devConfig.devServer = {
    port: 8080,
    compress: true,
    clientLogLevel: 'none',
    contentBase: path.resolve('./dist'),
    publicPath: '/',
    quiet: true,
    hot: true,
    watchOptions: {
      ignored: /node_modules/
    },
    historyApiFallback: true,
    proxy: {
      '/api/*': 'http://localhost:8102'
    }
  };
dgennetten commented 7 years ago

Issues I was having with grommet-cli are gone. We can probably close this.