Coder Social home page Coder Social logo

Comments (5)

montionugera avatar montionugera commented on August 12, 2024 1

Error: listen EADDRINUSE 127.0.0.1:8888

Kill the application that uses the port 8888

from learnnextjs-demo.

zebxu avatar zebxu commented on August 12, 2024 1

try to change the setting in next.config.js to

new BundleAnalyzerPlugin({
          analyzerMode: 'server',
          analyzerPort: isServer ? 8888 : 8889,
          openAnalyzer: true
        })

add one more port in analyzerPort

from learnnextjs-demo.

stevaras avatar stevaras commented on August 12, 2024

Happens to me as well. After a few seconds it crashes.
Nothing seems to run on the same port.
Changing port number didn't fix this.

"dependencies": {
    "cross-env": "^5.0.1",
    "express": "^4.15.2",
    "firebase": "^5.7.0",
    "next": "^7.0.2",
    "react": "^16.2.0",
    "react-dom": "^16.2.0",
    "webpack-bundle-analyzer": "^3.0.3"
  }

node: v11.4.0
npm: 6.4.1

The complete log of this run:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'analyze' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preanalyze', 'analyze', 'postanalyze' ]
5 info lifecycle [email protected]~preanalyze: [email protected]
6 info lifecycle [email protected]~analyze: [email protected]
7 verbose lifecycle [email protected]~analyze: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~analyze: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/stevaras/projects/nextjs/learnnextjs-demo/node_modules/.bin:/home/stevaras/anaconda2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
9 verbose lifecycle [email protected]~analyze: CWD: /home/stevaras/projects/nextjs/learnnextjs-demo
10 silly lifecycle [email protected]~analyze: Args: [ '-c', 'cross-env ANALYZE=1 next build' ]
11 silly lifecycle [email protected]~analyze: Returned: code: 1  signal: null
12 info lifecycle [email protected]~analyze: Failed to exec analyze script
13 verbose stack Error: [email protected] analyze: `cross-env ANALYZE=1 next build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at EventEmitter.emit (events.js:189:13)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:189:13)
13 verbose stack     at maybeClose (internal/child_process.js:978:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
14 verbose pkgid [email protected]
15 verbose cwd /home/stevaras/projects/nextjs/learnnextjs-demo
16 verbose Linux 4.15.0-42-generic
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "analyze"
18 verbose node v11.4.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] analyze: `cross-env ANALYZE=1 next build`
22 error Exit status 1
23 error Failed at the [email protected] analyze script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

from learnnextjs-demo.

Ishino avatar Ishino commented on August 12, 2024

running into the same issue

1 verbose cli [ '/usr/local/Cellar/node@8/8.12.0/bin/node',
1 verbose cli   '/usr/local/opt/node@8/bin/npm',
1 verbose cli   'run',
1 verbose cli   'analyze' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'preanalyze', 'analyze', 'postanalyze' ]
5 info lifecycle [email protected]~preanalyze: [email protected]
6 info lifecycle [email protected]~analyze: [email protected]
7 verbose lifecycle [email protected]~analyze: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]~analyze: PATH: /usr/local/Cellar/node@8/8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/dries/learnnextjs-demo/node_modules/.bin:/Users/dries/google-cloud-sdk/bin:/usr/local/opt/node@8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools
9 verbose lifecycle [email protected]~analyze: CWD: /Users/dries/learnnextjs-demo
10 silly lifecycle [email protected]~analyze: Args: [ '-c', 'cross-env ANALYZE=1 next build' ]
11 silly lifecycle [email protected]~analyze: Returned: code: 1  signal: null
12 info lifecycle [email protected]~analyze: Failed to exec analyze script
13 verbose stack Error: [email protected] analyze: `cross-env ANALYZE=1 next build`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/Cellar/node@8/8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at EventEmitter.emit (events.js:214:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/Cellar/node@8/8.12.0/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:126:13)
13 verbose stack     at ChildProcess.emit (events.js:214:7)
13 verbose stack     at maybeClose (internal/child_process.js:915:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd /Users/dries/learnnextjs-demo
16 verbose Darwin 18.2.0
17 verbose argv "/usr/local/Cellar/node@8/8.12.0/bin/node" "/usr/local/opt/node@8/bin/npm" "run" "analyze"
18 verbose node v8.12.0
19 verbose npm  v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error [email protected] analyze: `cross-env ANALYZE=1 next build`
22 error Exit status 1
23 error Failed at the [email protected] analyze script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]```

from learnnextjs-demo.

FabienSalles avatar FabienSalles commented on August 12, 2024

I don't understand the problem but I fixed the issue by modified the config option :
new BundleAnalyzerPlugin({analyzerMode: 'static'})

from learnnextjs-demo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.