Coder Social home page Coder Social logo

Comments (13)

chentsulin avatar chentsulin commented on April 28, 2024

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

from electron-react-boilerplate.

0x80 avatar 0x80 commented on April 28, 2024

👍

from electron-react-boilerplate.

chentsulin avatar chentsulin commented on April 28, 2024

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.

from electron-react-boilerplate.

chentsulin avatar chentsulin commented on April 28, 2024

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

from electron-react-boilerplate.

0x80 avatar 0x80 commented on April 28, 2024

thanks for investigating!

from electron-react-boilerplate.

asfktz avatar asfktz commented on April 28, 2024

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

from electron-react-boilerplate.

chentsulin avatar chentsulin commented on April 28, 2024

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

from electron-react-boilerplate.

haustraliaer avatar haustraliaer commented on April 28, 2024

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?

from electron-react-boilerplate.

chentsulin avatar chentsulin commented on April 28, 2024

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.

from electron-react-boilerplate.

t1mmen avatar t1mmen commented on April 28, 2024

@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?

from electron-react-boilerplate.

chentsulin avatar chentsulin commented on April 28, 2024

@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).

from electron-react-boilerplate.

haustraliaer avatar haustraliaer commented on April 28, 2024

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.

from electron-react-boilerplate.

chentsulin avatar chentsulin commented on April 28, 2024

close via #35

from electron-react-boilerplate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.