ameerthehacker / blazepack

⚡ Blazing fast dev server powered by sandpack
GNU Lesser General Public License v3.0
234 stars 17 forks source link

Give an error log to start server on other port #50

Closed saideepesh000 closed 3 years ago

saideepesh000 commented 3 years ago

When a port is taken, we need to show user to start current server on other port. I'm not sure why this isn't working in production, in development it's working

Development

Screenshot (45)

Screenshot (46)

Production

Screenshot (44)

saideepesh000 commented 3 years ago

Hey @ameerthehacker, just a quick doubt, how to check these kind of things while developing for production.

ameerthehacker commented 3 years ago

@saideepesh000 by default it should run in production, in mac process.env.NODE_ENV by default is null. I think in windows it is development which is actually causing the issue. If you can change

if (process.env.NODE_ENV !== 'test') {
 ...
}

During development we can set NODE_ENV to test for stack trace

saideepesh000 commented 3 years ago

@ameerthehacker Shall I raise a PR

ameerthehacker commented 3 years ago

@saideepesh000 yes please go ahead

ameerthehacker commented 3 years ago

@saideepesh000 the fix has been released in v0.0.61