Solved! Go to Solution.
@Kathir-1995 Here are the steps:
lib/web/requirejs/require.js
app/design/frontend/<Your theme vendor>/<your theme name>/web/requirejs/require.js
define = function (name, deps, callback) {
var node, context;
// Restrict pako library in google translate module from loading
if(typeof name !== 'string' && isFunction(deps) && deps.toString().includes('pako')){
return;
}
define = function (name, deps, callback) {
var node, context;
// Restrict pako library in google translate module from loading
if(typeof name !== 'string' && isFunction(deps) && deps.toString().includes('pako')){
return;
}
/* Rest of the define function code below */
If you find solution then please post the solution. I am also experiencing same issue.
Thanks in advance
same here, please share if you found a solution,
I am also facing the same issue. If anyone fixed please post the solution.
I am also facing the same kind of issue. Kindly let me know if anyone has found a solution for this.
Please see my solution here: https://magento.stackexchange.com/a/371374/114590
No its not working i have tried your solution
Hi @schnyadav161 we have implemented his solution yesterday, the js does not break anymore and customers can still use translations
Please share the file path and file name which need to be overriden. His post was not clear.
@Kathir-1995 Here are the steps:
lib/web/requirejs/require.js
app/design/frontend/<Your theme vendor>/<your theme name>/web/requirejs/require.js
define = function (name, deps, callback) {
var node, context;
// Restrict pako library in google translate module from loading
if(typeof name !== 'string' && isFunction(deps) && deps.toString().includes('pako')){
return;
}
define = function (name, deps, callback) {
var node, context;
// Restrict pako library in google translate module from loading
if(typeof name !== 'string' && isFunction(deps) && deps.toString().includes('pako')){
return;
}
/* Rest of the define function code below */
Code is working. Thanks for suggestion
@schnyadav161 this error does not cause the website to break. The above fix prevents an injection of the pako library into the Magento js modules that results in malfunctioning of the website entirely.
The error that you shared the screentshot of does not affect any functionality and it occurs on any website that is translated regardless of it is magento or any other. Because the code is inside the google translate chrome extension, we cannot change this.
@schnyadav161 did you confirm if the js file was updated after the deployment? If possible, please share the site url.
Hi @athar_ego
I have tried your step but still getting the issue in console
Cannot read properties of undefined (reading 'gzip')