Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket.io warnings #10

Closed
0x80 opened this issue Jun 1, 2015 · 13 comments
Closed

Socket.io warnings #10

0x80 opened this issue Jun 1, 2015 · 13 comments
Labels

Comments

@0x80
Copy link

0x80 commented Jun 1, 2015

I'm seeing all these warnings. And they also appear in the browser console. Any idea what's causing this? I think this is just the develop branch, not the master...

WARNING in (webpack)-dev-server//socket.io-client//engine.io-client//ws/lib/BufferUtil.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../build/Release/bufferutil in /Users/me/Development/myapp/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib
@ (webpack)-dev-server/
/socket.io-client//engine.io-client//ws/lib/BufferUtil.js 8:19-57

WARNING in (webpack)-dev-server//socket.io-client//engine.io-client//ws/lib/BufferUtil.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../build/default/bufferutil in /Users/me/Development/myapp/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib
@ (webpack)-dev-server/
/socket.io-client//engine.io-client//ws/lib/BufferUtil.js 10:19-57

WARNING in (webpack)-dev-server//socket.io-client//engine.io-client//ws/lib/Validation.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../build/Release/validation in /Users/me/Development/myapp/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib
@ (webpack)-dev-server/
/socket.io-client//engine.io-client//ws/lib/Validation.js 8:19-57

WARNING in (webpack)-dev-server//socket.io-client//engine.io-client//ws/lib/Validation.js
Module not found: Error: Cannot resolve 'file' or 'directory' ../build/default/validation in /Users/me/Development/myapp/node_modules/webpack-dev-server/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/ws/lib
@ (webpack)-dev-server/
/socket.io-client//engine.io-client//ws/lib/Validation.js 10:19-57
webpack: bundle is now VALID.

@chentsulin
Copy link
Member

There are some problems with webpack-dev-server 1.8 and ws, I will update it to fix this.

@chentsulin chentsulin added the bug label Jun 2, 2015
@0x80
Copy link
Author

0x80 commented Jun 2, 2015

👍

@chentsulin
Copy link
Member

It seems that wepback-dev-server rely on a old verion ws v0.4.31 and it has some try catch code in BufferUtil.js to let it works for somehow.

try {
  module.exports = require('../build/Release/bufferutil');
} catch (e) { try {
  module.exports = require('../build/default/bufferutil');
} catch (e) { try {
  module.exports = require('./BufferUtil.fallback');
} catch (e) {
  console.error('bufferutil.node seems to not have been built. Run npm install.');
  throw e;
}}}

In my opinion, maybe it's not a issue, just a warning because this try catch flow usage.

@chentsulin
Copy link
Member

I finally figure out this is a issue with webpack target: 'atom' and engine.io-client, and it breaks react-hot now.

See socketio/engine.io-client#376, webpack/webpack-dev-server#191

@0x80
Copy link
Author

0x80 commented Jun 6, 2015

thanks for investigating!

@asfktz
Copy link

asfktz commented Jul 8, 2015

it is possible to disable react hot somehow until it fixed?

@chentsulin
Copy link
Member

webpack --watch with npm start will works. But should refresh manually using Cmd + R.

@haustraliaer
Copy link

Hmmm I'd honestly rather have some warnings flash up than forego hot reloading... is this an option? Or do you think the issue will be resolved quite soon?

Or perhaps I can just use an older release of this boilerplate?

@chentsulin
Copy link
Member

Hot reload should be fixed in 0.2.9.

But using target web maybe not be a good enough solution. Let's keep tracing issues between webpack and socket.io here.

@t1mmen
Copy link

t1mmen commented Aug 17, 2015

@chentsulin, I overwrote my 0.2.8 make-webpack-config.js with the one from 0.2.9, but I'm getting the following error:

[19438:0817/122219:INFO:CONSOLE(744)] "Uncaught TypeError: Cannot read property '_currentElement' of null", source: webpack:///./~/react/lib/ReactCompositeComponent.js? (744)

Reverting back to the old make-webpack-config.js makes the error go away. Ideas?

@chentsulin
Copy link
Member

@t1mmen

Uncaught TypeError: Cannot read property '_currentElement' of null

It's most likely a React issue or issue with react-hot-load. And also not everything in flux is hot-reloadable, so sometimes you should do a full refresh in your browser (or electron renderer).

@haustraliaer
Copy link

I got it working again by using:

npm run hot-dev-server
HOT=1 electron .

I had to remove NODE_ENV=development from the start command.

@chentsulin
Copy link
Member

close via #35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants