Recently took over an old angular1.6 project and encountered many problems in the development process, both at the code level and at the management level.
Let’s record the problems encountered when running the code
[15:45:15] Starting ‘startserver’…
Start webserver……
events.js:165
throw er; // Unhandled ‘error’ event
^
Error: listen EADDRINUSE :::4000
at Server.setupListenHandle [as _listen2] (net.js:1346:14)
at listenInCluster (net.js:1387:12)
at Server.listen (net.js:1475:7)
at Object. (D:\TeaGarden\ShareTeams\TeaGarden\WEB_Code\Client101901\app.js:52:8)
at Module._compile (internal/modules/cjs/loader.js:654:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:665:10)
at Module.load (internal/modules/cjs/loader.js:566:32)
at tryModuleLoad (internal/modules/cjs/loader.js:506:12)
at Function.Module._load (internal/modules/cjs/loader.js:498:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:695:10)
Emitted ‘error’ event at:
at emitErrorNT (net.js:1366:8)
at process._tickCallback (internal/process/next_tick.js:178:19)
at Function.Module.runMain (internal/modules/cjs/loader.js:697:11)
at startup (internal/bootstrap/node.js:201:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:516:3)
[15:45:16] ‘startserver’ errored after 1.4 s
[15:45:16] Error in plugin “gulp-shell”
Message:
Command node --nolazy app.js
failed with exit code 1
Find the cause.
Node.js port conflict: LISTEN EADDRINUSE :::4000
There are two solutions.
1. change the port number
2. kill the process occupying port 4000
Find the process occupying the port.
netstat -ano |findstr 4000
Similar Posts:
- Error: listen EADDRINUSE :::3000
- Throw Er of node error// Unhandled ‘error’ event solution
- Cannot findmodule’webpack-cli/bin/config-yargs
- Solve Error: MissingSchemaError: Schema hasn’t been registered for model “YourModel”.
- gulp Cannot read property ‘apply’ of undefined
- NPM Install vue-cli Error: internal/modules/cjs/loader.js (Error: Cannot find module ‘D:\Program\nodejs\node_global\node_modules\vue-cli\bin\vue’)
- Angular Project Download Error: [ERROR] ionic-app-scripts has unexpectedly closed (exit code 1).
- Module build failed: Error: Cannot find module ‘node-sass’
- How to Solve Error: ENOENT: no such file or directory, scandir ‘..\node_modules\node-sass\vendor’
- Cannot find module ‘../lib/utils/unsupported.js’