I am attempting to add a module to my Gatsby project that reads the data from a Google spreadsheet. To this end I added the Google spreadsheet package - https://www.npmjs.com/package/google-spreadsheet - but I had a number of problems building once installed. I added the following code to my gatsby-node.js which fixed the build:
actions.setWebpackConfig({
resolve: {
fallback: {
fs: false,
tls: false,
net: false,
path: false,
zlib: false,
http: false,
https: false,
stream: false,
crypto: false,
url: false,
os: false,
util: false,
assert: false,
child_process: false,
},
},
});
However, my web page now crashes on run when developing with gatsby develop, with the following error:
It seems that other people have had similar problems with the jws dependence - see here.
If anyone has any ideas on a fix, they would be gratefully received.