Forum Discussion
Please share your feedback on the SPFx Workbench
It would appear that you can only have one Node.js command prompt at a time otherwise you get an error :- [14:00:05] Error - Unknown
listen EADDRINUSE :::4321
{ [Error: listen EADDRINUSE :::5432]
code: 'EADDRINUSE',
errno: 'EADDRINUSE',
syscall: 'listen',
address: '::',
port: 5432 }
[14:00:05] Error - Unknown
listen EADDRINUSE :::5432
Which I think is the SPFx workbench port number.
Could we have more than one Node.js command prompt running at once please ?
Regards
NIgel
- Jeremy Kelley (SHAREPOINT)Jan 30, 2017Microsoft
Hi Nigel! Can you let me know what command (or sequence of commands) you're executing when you get that error? I don't seem to have trouble keeping a couple Node.JS windows open at a time but it's likely just that I'm not doing exactly what you are. Thanks!
-Jeremy
- Nigel_Price9911Jan 30, 2017Iron Contributor
Hi Jeremy
I was just using gulp serve in both command windows with different webparts.
Regards
Nigel
- Jeremy Kelley (SHAREPOINT)Jan 30, 2017Microsoft
I talked to our devs and actually got an answer as to how to make this work today. If you look in your web part Config folder you'll see a file named serve.json. You should be able to change the port number in that config file (there are two entries in the file that use the number) and have side by side local work benches for two independent projects!
The default contents looks like this:
{ "port": 4321, "initialPage": "https://localhost:5432/workbench", "https": true, "api": { "port": 5432, "entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/" }}
I believe you want to change the initialPage and port inside the API section.