meteor / blaze

:fire: Meteor Blaze is a powerful library for creating live-updating user interfaces
http://blazejs.org/
Other
528 stars 115 forks source link

Blaze Console Errors in React app after upgrading from Meteor 1.8.1 to 1.8.2 #302

Closed Natas0007 closed 4 years ago

Natas0007 commented 4 years ago

Hey there, I've just upgraded one of my Meteor apps from 1.8.1 to 1.8.2. This particular app is purely React without the use of Blaze at all...not even for accounts. The app runs without error and everything in the UI works as expected...but I'm receiving some errors in the browser console that are Blaze related. I also don't have full-blown jquery installed. Below are the errors, my installed packages (tree) file, my versions file, and my package.json dependencies. I do see 2 Blaze entries in the versions file but those 2 were there while I ran on 1.8.1 also. I haven't been able to find anything directly related in Meteor or Blaze issues. Any help would be much appreciated!

Errors: image

.meteor/versions: versions.txt

meteor list --tree: packagesTree.txt

package.json dependencies: "dependencies": { "@babel/runtime": "^7.7.6", "@fortawesome/fontawesome-svg-core": "^1.2.15", "@fortawesome/free-brands-svg-icons": "^5.7.2", "@fortawesome/free-solid-svg-icons": "^5.7.2", "@fortawesome/react-fontawesome": "^0.1.4", "@google-cloud/logging-winston": "^0.11.1", "accounting": "^0.4.1", "bcrypt": "^3.0.5", "bootstrap": "^4.3.1", "buttercms": "^1.1.4", "formik": "^1.5.2", "griddle-react": "^1.13.1", "highcharts": "^7.1.1", "highcharts-react-official": "^2.1.3", "meteor-node-stubs": "^0.4.1", "moment": "^2.24.0", "popper.js": "^1.14.7", "react": "^16.5.0", "react-bootstrap": "^1.0.0-beta.5", "react-dom": "^16.5.0", "react-ga": "^2.5.7", "react-mounter": "^1.2.0", "webfontloader": "^1.6.28", "winston": "^3.2.1", "yup": "^0.27.0" },

coagmano commented 4 years ago

Looking at your packages tree, blaze is coming from mdg:seo through it's dependency on templating.

This looks like it's used to add a meta tag to the document head, and a quick google says that particular tag is not actually needed anymore.

Also, with the Meteor server-render update, there's better ways to add something to the <head> without needing blaze.

Looks like there's an existing issue for exactly this: https://github.com/meteor/galaxy-seo-package/issues/6

mdg:seo should remove templating, and use server-render instead.

In the mean time you can solve the problem locally by downloading the contents of mdg:seo into your /packages/mdg-seo folder and remove the templating dependency from Pacakge.js there. Either replace it with static-html or just remove the client file and the reference to it from Package.js

Natas0007 commented 4 years ago

All great info @coagmano ! Thanks for the quick response! Just for completeness, I will get with Galaxy support to verify their recommended fix. The mdg:seo package was previously recommended by them to enable server-side pre-render for SEO friendliness. Once I have a response, I will update this issue and close it.

filipenevola commented 4 years ago

Hi, I just published version 3.2.2 of mdg:seo that should fix this issue https://github.com/meteor/galaxy-seo-package/releases/tag/v3.2.2

Natas0007 commented 4 years ago

Thanks @filipenevola !! Awesome!