christianalfoni / webpack-express-boilerplate

A boilerplate for running a Webpack workflow in Node express
MIT License
1.39k stars 291 forks source link

Bash error (Must provide a proper URL as target) #2

Open ha404 opened 9 years ago

ha404 commented 9 years ago

After running npm start I get this:

Bundling...
Server running on port 3000
Bundling project, please wait...
Bundled in 1441140904826ms!
[Error: Must provide a proper URL as target]
{ [Error: socket hang up] code: 'ECONNRESET' }

Everything seems to run fine though...

christianalfoni commented 9 years ago

Hi @hawsome , never seen that before, weird!

Though... how long did you wait for that message... 1441140904826 ms?

almeynman commented 9 years ago

I also experience these errors, but they do not seem to affect the workflow. I added console.error(e) in server.js file and now receiving Error: Must provide a proper URL as target, when updating main.js or its dependencies and { [Error: socket hang up] code: 'ECONNRESET' } when closing the browser window

Added console.error(e) here:

proxy.on('error', (e) => {
    // Just catch it
    console.log('Could not connect to proxy, please try again...');
    console.error(e);
  });

Full console logs are here:

Bundling...
Server running on port 3000
Bundling project, please wait...
Container#eachAtRule is deprecated. Use Container#walkAtRules instead.
Container#eachRule is deprecated. Use Container#walkRules instead.
Container#eachDecl is deprecated. Use Container#walkDecls instead.
Bundled in 1541ms!
Could not connect to proxy, please try again...
[Error: Must provide a proper URL as target] // updated main.css
Bundling...
Bundled in 367ms!
Bundling...
Bundled in 47ms!
Could not connect to proxy, please try again...
{ [Error: socket hang up] code: 'ECONNRESET' } // closed window
Could not connect to proxy, please try again...
[Error: Must provide a proper URL as target] 
Bundling...
Bundled in 89ms!
Could not connect to proxy, please try again...
{ [Error: socket hang up] code: 'ECONNRESET' }
Could not connect to proxy, please try again...
[Error: Must provide a proper URL as target]

PS Thank you so much for this awesome setup, really helped me increase productivity

eugene-kn commented 9 years ago

Hi Christian,

I also experience this error:

I've put this in server.js:

proxy.on('error', function(e) { console.log('PROXY ERROR: ', e); });

And then as I work I get this...

PS D:\Development\Websites\friend-finder> npm start

webpack-express-boilerplate@0.1.0 start D:\Development\Websites\friend-finder node server

Bundling... Server running on port 3000 Bundling project, please wait... PROXY ERROR: [Error: Must provide a proper URL as target] Bundled in 1742ms! Bundling... Bundled in 594ms! PROXY ERROR: { [Error: socket hang up] code: 'ECONNRESET' } PROXY ERROR: [Error: Must provide a proper URL as target]

Would appreciate for any tip on how to fix that.

Thank you for Cerebral too!

christianalfoni commented 9 years ago

Hi there!

Could you try the latest version? The boilerplate has been revamped :-)