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
Has anyone ever seen the exports is not defined error in the browser from gatsby-source-sanity when loading a site in dev mode? The exact same site in production does not display the error. I am using the latest version of this package (v7.6.3)
To be more specific, the error’s source is from ./node_modules/gatsby-source-sanity/lib-es5/debug.js, which is only a few lines:
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var debug_1 = __importDefault(require("debug"));
exports.default = (0, debug_1.default)('sanity');
//# sourceMappingURL=debug.js.map
Here is the dev site running on Digital Ocean with the error (I am using Digital Ocean so I can run the site in dev mode in order to use it as the CMS Preview site, ie, hot reload). Same on my local server: https://springshow-2024-cms-preview-site-9rydb.ondigitalocean.app/
Both the dev and production sites were built using the same git commit.
For context, I recently replaced the gatsby-plugin-image with the gatsby-plugin-sanity-image package in order to use Sanity’s image hotspot / cropping feature; the package works great! Unfortunately, this odd error with gatsby-source-sanity in dev mode. Prior to installing the package the dev site loaded fine at Digital Ocean. It’s odd that error is not from this package but from gatsby-source-sanity and it’s about module exports.
The exports object shouldn't be in the client bundle, correct? From what I understand, when creating the development bundle, Gatsby uses a lightweight version the transpiler and bundler (compared to when creating the production bundle) that might not have thoroughly updated the use of the exports object in the browser????
Thanks in advance for any suggestions!
The text was updated successfully, but these errors were encountered:
Hi,
Has anyone ever seen the
exports is not defined
error in the browser from gatsby-source-sanity when loading a site in dev mode? The exact same site in production does not display the error. I am using the latest version of this package (v7.6.3)To be more specific, the error’s source is from ./node_modules/gatsby-source-sanity/lib-es5/debug.js, which is only a few lines:
Here is the dev site running on Digital Ocean with the error (I am using Digital Ocean so I can run the site in dev mode in order to use it as the CMS Preview site, ie, hot reload). Same on my local server:
https://springshow-2024-cms-preview-site-9rydb.ondigitalocean.app/
And here is the production site without the error:
https://2024springshow.academyart.edu/
Both the dev and production sites were built using the same git commit.
For context, I recently replaced the gatsby-plugin-image with the gatsby-plugin-sanity-image package in order to use Sanity’s image hotspot / cropping feature; the package works great! Unfortunately, this odd error with gatsby-source-sanity in dev mode. Prior to installing the package the dev site loaded fine at Digital Ocean. It’s odd that error is not from this package but from gatsby-source-sanity and it’s about module exports.
The
exports
object shouldn't be in the client bundle, correct? From what I understand, when creating the development bundle, Gatsby uses a lightweight version the transpiler and bundler (compared to when creating the production bundle) that might not have thoroughly updated the use of theexports
object in the browser????Thanks in advance for any suggestions!
The text was updated successfully, but these errors were encountered: