Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: listen EADDRINUSE: address already in use :::8989 at Server.setupListenHandle [as _listen2] (net.js:1279:14) #129

Open
samsonCao opened this issue Dec 31, 2019 · 7 comments

Comments

@samsonCao
Copy link

Description

Error: listen EADDRINUSE: address already in use :::8989
at Server.setupListenHandle [as _listen2] (net.js:1279:14)

Steps to reproduce

  1. cd examlpes/sale
    2.npm install
  2. npm i webpack-cli@3.1.1 --save-dev
  3. npm audit fix
  4. npm run dev

Plugin configration

 new SkeletonPlugin({
      pathname: path.resolve(__dirname, `./shell`),
      staticDir: path.resolve(__dirname, './dist'),
      routes: ['/'],
      // port: '6666',
      loading: 'chiaroscuro',
      svg: {
        color: '#EFEFEF',
        shape: 'circle',
        shapeOpposite: ['.Rating-gray_1kpffd5_0 svg']
      },
      image: {
        shape: 'rect', // `rect` | `circle`
        color: '#EFEFEF',
        shapeOpposite: ['.mint-swipe-items-wrap img']
      },
      pseudo: {
        color: '#EFEFEF', // or transparent
        shape: 'circle', // circle | rect
        shapeOpposite: ['.delivery-icon-hollow_3q8_B5r_0', '.index-premium_39rl0v9']
      },
      button: {
        color: '#EFEFEF',
        excludes: ['.mint-swipe-items-wrap a']
      },
      defer: 5000,
      excludes: [],
      remove: [],
      hide: ['.index-dashedline_7B79b3W', '.Rating-actived_GBtiHkB_0'],
      grayBlock: ['#header'],
      cssUnit: 'rem',
      headless: true,
      // minify: false,
      cookies: [{
        name: 'SID',
        value: 'a495vvmEPEE4DZi083dr8yR3EAPYqW40HaWA',
        url: 'https://h5.ele.me'
      }, {
        name: 'USERID',
        value: '273745271',
        url: 'https://h5.ele.me'
      }],
      noInfo: false
    }),

Versions

  • Page Skeleton: ^0.10.12
  • Webpack:4.41.5
@katoto
Copy link

katoto commented Jun 1, 2020

+1 无论如何修改端口号,都是这个错误

@sineava
Copy link

sineava commented Jul 18, 2020

这个issue过了这么久没人解决吗

@debug-null
Copy link

我也是遇到这个问题。

@AnselDai
Copy link

+1,检查端口明明没有占用也会报这个错误

@luoguoxiong
Copy link

我也遇到这个问题?还维护吗

@buhanqiu
Copy link

// 修改node_modules/page-skeleton-webpack-plugin/src/skeletonPlugin.js
if (!this.server) {
const server = this.server = new Server(this.options) // eslint-disable-line no-multi-assign
server.listen().catch(err => server.log.warn(err))
}

虽然可以解决这个问题 但是这个插件还有其他问题 不建议使用

@bella0929
Copy link

// 修改node_modules/page-skeleton-webpack-plugin/src/skeletonPlugin.js 下的SkeletonPlugin.prototype.createServer
SkeletonPlugin.prototype.createServer = function () {
// const server = this.server = new Server(this.options)
// server.listen().catch(err => server.log.warn(err))
//原来上面👆的这两行注释掉
//加上下面的代码👇
if (!this.server) {
const server = this.server = new Server(this.options) // eslint-disable-line no-multi-assign
server.listen().catch(err => server.log.warn(err))
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants