Comments (14)
Hi @bolicd ,
For 1, may I have the route/url when you encountered this issue?
For 2, is it test-prebuild command? (yarn test:prebuild
)
from universal-redux-template.
Hi
- Route was: http://localhost:3000/
I've only changed Intro Page title to Intro Page2 and done yarn start. Errors in console are:
warning.js?8a56:36 Warning: React attempted to reuse markup in a container but the checksum was invalid.
GET http://localhost:3000/76d2c183740ddb85f14e.hot-update.json 404 (Not Found)
process-update.js?e13e:37 [HMR] Cannot find update (Full reload needed)
[HMR] (Probably because of restarting the server)
- Im using git bash, and I was typing script for generating new component as described in main readme file:
$ ./bin/generate component myNamespace/MyComponent
from universal-redux-template.
Hi @bolicd ,
For the generator part, I update the code in this commit to create directories by node-mkdirp. Can you please fetch the latest master
branch to see if the issue persists? (Sorry I don't have a windows machine to test that 😛 )
For the invalid checksum one, I can't reproduce it on my end.
The warning message indicated that the HTML provided by server rendering didn't match the one browser tried to render in the initial rendering. Did you see something like
(client): ...
(server): ...
appended after the invalid checksum warning message on your console?
from universal-redux-template.
Hi,
will fetch and check generator part thanks.
For invalid checksum here is more information, it may be related to the node version or something:
node v: 6.9.1
npm v: 3.10.8
yarn: 0.24.6
git win version: git version 2.11.0.windows.1
I only changed one file: containers/Intro.js line: 13 from:
<h1>Intro Page</h1>
to
<h1>Intro Pagexxx</h1>
Console loads changed concent from server and then renders original content from the client(!?) showing the error:
Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server: (client) actid="5">Intro Page</h1><div data-react (server) actid="5">Intro Pagexxx</h1><div data-re
Additional console log errors
process-update.js?e13e:37 [HMR] Cannot find update (Full reload needed) cb @ process-update.js?e13e:37 (anonymous) @ process-update.js?e13e:68 process-update.js?e13e:38 [HMR] (Probably because of restarting the server)
I've sucessfully used this template in my previous project, without any issues, altho I was working on Mac, so im not sure if this is related to the Windows or not. I think theres some issue with webpack or server side rendering here.
Thanks
from universal-redux-template.
Hi @bolicd ,
For the checksum issue, looks like the client code didn't catch the update from Page
to Pagexxx
.
Can you check are there any js
files in your dist
folder? If there are, please remove them any try again.
I updated the webpack building process a couple days ago, from webpack-dev-server
to its middleware. The js files in dist
folder is the result of the older version, which will not appear under the new version. But if you have run the old version (so that there're some js files built into dist
) you have to remove them manually.
from universal-redux-template.
Hi,
i've deleted /dist folder completely. Now everything seems to be working without an issue.Will pull master and test script for generating component later.
Thanks
from universal-redux-template.
Hi,
I've tried new master branch. Deleting /dist folder seems to be working so far(without it, i get checksum warning but page still renders ok).
However, scripts are still not functional. Here is the output:
$ ./bin/generate component testComponent/testComponent
mkdir...
copy files...
sed...
C:\repos\universal-redux-template\bin_generate.js:143
throw new Error('unknown os type ' + osType);
^Error: unknown os type windows_nt
at getSedCommand (C:/repos/universal-redux-template/bin/_generate.js:92:11)
at sed (C:/repos/universal-redux-template/bin/_generate.js:72:20)
at Object. (C:/repos/universal-redux-template/bin/_generate.js:11:1)
at Module._compile (module.js:570:32)
at loader (C:\repos\universal-redux-template\node_modules\babel-register\lib\node.js:144:5)
at Object.require.extensions.(anonymous function) [as .js] (C:\repos\universal-redux-template\node_modules\babel-register\lib\node.js:154:7)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
from universal-redux-template.
I think it's because I used sed
command which only works on *nix os. I guess shelljs can solve this issue, will add it later.
from universal-redux-template.
Having this issue also.
Created new component and placed it intstead of intro component in router.
warning.js?8a56:36 Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
from universal-redux-template.
hi @sabervision ,
can you check is there any js file in your dist folder? If there are, please remove them any try again.
from universal-redux-template.
I deleted dist folder completely and now it is working.
I don't know will there be any side effects?
Did not try to delete js files, though.
from universal-redux-template.
HI @sabervision ,
Good to know it works!
There should not be any side effect for deleting files in dist
folder, it's used for production build.
The current config of static
settings on Express side can be further improved to eliminate such kind of issue.
from universal-redux-template.
when i add some html element in my contest i received this error
warning.js:35 Warning: React attempted to reuse markup in a container but the checksum was invalid. This generally means that you are using server rendering and the markup generated on the server was not what the client was expecting. React injected new markup to compensate which works but you have lost many of the benefits of server rendering. Instead, figure out why the markup being generated is different on the client or server:
(client) actid="2"><div class="Contest" data
(server) actid="2">
from universal-redux-template.
hi @shahidarzoo007 ,
Thanks for checking in!
Can you please try to remove the dist
folder and see if the issue persists?
from universal-redux-template.
Related Issues (20)
- How to add Google Analytics? HOT 2
- Favicon and static assets HOT 5
- Server rendering requests data twice HOT 3
- CALL_API question HOT 2
- Question: Multiple server side dispatches? HOT 2
- POST Requests Not Firing? HOT 2
- updated dependency versions? HOT 1
- how to use with redux-form? HOT 1
- How to use with redux thunk? HOT 1
- use css-loader in webpackage,but not work? HOT 1
- Can't load css/less in server render HOT 1
- dotenv should be in devDependencies? HOT 1
- Gulp Rev Not Working? HOT 3
- When I refresh my page it does not call componentDidMount() but In your app it is calling. HOT 1
- Deprecation warnings when trying out template HOT 3
- [QUESTION] Deployment issue HOT 3
- Where to write bussines logic?
- Updated code for newer dependency versions
- [QUESTION] Deployment API_BASE_URL HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from universal-redux-template.