You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So I'm getting a very strange syntax error whenever I try to use the addToMailchimp function in my code. Same error comes up when I tried use jsonp to submit the form so these might be related.
Here's the error I get in the browser's console:
Uncaught SyntaxError: Unexpected token .
As you can see, it's very vague, so it'll probably help if I share my component's code. I'm using Formik as a dependency so that might also be part of the problem although I can't see why (my solution worked on older versions of the plugin).
I'm not really sure what the error means since it's so vague. inspecting the error in console, common.js references this function as the cause:
/**
* Save `namespaces`.
*
* @param {String} namespaces
* @api private
*/
function save(namespaces) {
if (null == namespaces) {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete {}.DEBUG;
} else {
{}.DEBUG = namespaces;
}
}
Again, not much info to go on. Maybe it's an issue with my versions or maybe it's something to do with Formik. Also I set my node config to this in gatsby-node to remove the missing fs dependency issue that I was getting with previous attempts to make this plugin work.
node: {
fs: 'empty',
net: 'empty',
},
This worked fine when I was on the older version (gatsby-plugin-mailchimp": "https://github.com/benjaminhoffman/gatsby-plugin-mailchimp.git#gatsby-v2") so it might be something to do with the latest version update.
Any help would be appreciated, thanks!
The text was updated successfully, but these errors were encountered:
So I'm getting a very strange syntax error whenever I try to use the
addToMailchimp
function in my code. Same error comes up when I tried usejsonp
to submit the form so these might be related.Here's the error I get in the browser's console:
Uncaught SyntaxError: Unexpected token .
As you can see, it's very vague, so it'll probably help if I share my component's code. I'm using Formik as a dependency so that might also be part of the problem although I can't see why (my solution worked on older versions of the plugin).
Here's the relevant dependencies I have:
Here's how my form component looks like:
I'm not really sure what the error means since it's so vague. inspecting the error in console,
common.js
references this function as the cause:Again, not much info to go on. Maybe it's an issue with my versions or maybe it's something to do with Formik. Also I set my node config to this in
gatsby-node
to remove the missingfs
dependency issue that I was getting with previous attempts to make this plugin work.This worked fine when I was on the older version (
gatsby-plugin-mailchimp": "https://github.com/benjaminhoffman/gatsby-plugin-mailchimp.git#gatsby-v2"
) so it might be something to do with the latest version update.Any help would be appreciated, thanks!
The text was updated successfully, but these errors were encountered: