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
I am learning Gatsby but most of the react components I try to build with npm modules that have anything about document or window create build errors. Like prism.js common for anyone to use gives me the following error
`error Building static HTML failed
WebpackError: ReferenceError: document is not defined`
react-comments and many many more.
I have learned how to get around this in gatsby-browsers.js or html.js, with my old non $ jquery scripts, but how do you fix this for npm modules???
The text was updated successfully, but these errors were encountered:
Thanks for the info but I would still like to be able to tell webpack to overlook window and document errors in modules because some of the npm modules having document as a error being undefined.
I am learning Gatsby but most of the react components I try to build with npm modules that have anything about document or window create build errors. Like prism.js common for anyone to use gives me the following error
`error Building static HTML failed
See our docs page on debugging HTML builds for help https://gatsby.dev/debug-html
175 |
176 | highlightAll: function(async, callback) {
WebpackError: ReferenceError: document is not defined`
react-comments and many many more.
I have learned how to get around this in gatsby-browsers.js or html.js, with my old non $ jquery scripts, but how do you fix this for npm modules???
The text was updated successfully, but these errors were encountered: