error - ./node_modules/google-auth-library/build/src/auth/googleauth.js:17:0
Module not found: Can't resolve 'child_process'
null
You must do this inside your next.config.js to make everything work
module.exports={// other next configi18n:{locales:["en","ms"],defaultLocale:"en",},env:{SPREADSHEET_ID:***,SHEET_ID:***,CLIENT_EMAIL:***,PRIVATE_KEY:***,},webpack:(config,options)=>{config.node={// Some libraries import Node modules but don't use them in the browser.// Tell Webpack to provide empty mocks for them so importing them works....config.node,fs:'empty',child_process:'empty',net:'empty',tls:'empty',}returnconfig},};
ignore the other settings and focus on the webpack part.
Y'all guys gonna come to an issue,
error - ./node_modules/google-auth-library/build/src/auth/googleauth.js:17:0
Module not found: Can't resolve 'child_process'
null
You must do this inside your next.config.js to make everything work
ignore the other settings and focus on the webpack part.
Magic! Thanks man! :)
Where do we find next.config.js file, I can't seem to find that file