https://v0.dev/chat/error-resolution-Le8ZyJpqZQc we continue the chat so iam getting 3 errors and i provide the contact component too Compiled with problems: Ć ERROR in node:events Module build failed: UnhandledSchemeError: Reading from "node:events" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. You may need an additional plugin to handle "node:" URIs. at C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:984:10 at Hook.eval [as callAsync] (eval at create (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at Hook.CALL_ASYNC_DELEGATE [as _callAsync] (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\tapable\lib\Hook.js:18:14) at Object.processResource (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:980:8) at processResource (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\loader-runner\lib\LoaderRunner.js:220:11) at iteratePitchingLoaders (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\loader-runner\lib\LoaderRunner.js:171:10) at runLoaders (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\loader-runner\lib\LoaderRunner.js:398:2) at NormalModule._doBuild (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:965:3) at NormalModule.build (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:1155:15) at C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\Compilation.js:1422:12 at NormalModule.needBuild (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:1480:26) at Compilation._buildModule (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\Compilation.js:1403:10) at C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\util\AsyncQueue.js:340:10 at Hook.eval [as callAsync] (eval at create (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at AsyncQueue._startProcessing (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\util\AsyncQueue.js:330:26) at AsyncQueue._ensureProcessing (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\util\AsyncQueue.js:317:12) at process.processImmediate (node:internal/timers:478:21) ERROR in node:process Module build failed: UnhandledSchemeError: Reading from "node:process" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. You may need an additional plugin to handle "node:" URIs. at C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:984:10 at Hook.eval [as callAsync] (eval at create (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at Object.processResource (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:980:8) at processResource (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\loader-runner\lib\LoaderRunner.js:220:11) at iteratePitchingLoaders (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\loader-runner\lib\LoaderRunner.js:171:10) at runLoaders (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\loader-runner\lib\LoaderRunner.js:398:2) at NormalModule._doBuild (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:965:3) at NormalModule.build (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:1155:15) at C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\Compilation.js:1422:12 at NormalModule.needBuild (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:1480:26) at Compilation._buildModule (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\Compilation.js:1403:10) at C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\util\AsyncQueue.js:340:10 at Hook.eval [as callAsync] (eval at create (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at AsyncQueue._startProcessing (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\util\AsyncQueue.js:330:26) at AsyncQueue._ensureProcessing (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\util\AsyncQueue.js:317:12) at process.processImmediate (node:internal/timers:478:21) ERROR in node:util Module build failed: UnhandledSchemeError: Reading from "node:util" is not handled by plugins (Unhandled scheme). Webpack supports "data:" and "file:" URIs by default. You may need an additional plugin to handle "node:" URIs. at C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:984:10 at Hook.eval [as callAsync] (eval at create (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at Object.processResource (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:980:8) at processResource (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\loader-runner\lib\LoaderRunner.js:220:11) at iteratePitchingLoaders (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\loader-runner\lib\LoaderRunner.js:171:10) at runLoaders (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\loader-runner\lib\LoaderRunner.js:398:2) at NormalModule._doBuild (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:965:3) at NormalModule.build (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:1155:15) at C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\Compilation.js:1422:12 at NormalModule.needBuild (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\NormalModule.js:1480:26) at Compilation._buildModule (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\Compilation.js:1403:10) at C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\util\AsyncQueue.js:340:10 at Hook.eval [as callAsync] (eval at create (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:6:1) at AsyncQueue._startProcessing (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\util\AsyncQueue.js:330:26) at AsyncQueue._ensureProcessing (C:\Users\SRIRAGHAVAN K\OneDrive\Desktop\lissomsoft\lissomsoft\node_modules\webpack\lib\util\AsyncQueue.js:317:12) at process.processImmediate (node:internal/timers:478:21)
I can see you're encountering errors with Node.js built-in modules in your webpack configuration. The errors are related to the node:
protocol imports for events
, process
, and util
modules. This is a common issue when building applications that use Node.js modules for the browser.
You need to add Node.js polyfills to your webpack configuration. Here's how to fix it:
next.config.js
You'll need to install the polyfill packages:
npm install --save-dev events process util stream-browserify buffer path-browserify crypto-browserify stream-http https-browserify os-browserify browserify-zlib
Since you're using server actions with Google Sheets and nodemailer, which are Node.js specific libraries, I recommend moving this logic completely to the server side. Here's a modified version of your server action that will work better:
app/api/contact/route.js
Then update your ContactPage component to use this API route instead of the server action:
code
ProvidePlugin
automatically provides the process
and Buffer
globals that many Node.js modules expect.This approach separates your client-side and server-side code more clearly, which is a best practice for Next.js applications.
I see you're working on the Lissomsoft website using Create React App, and you're encountering errors with Node.js built-in modules. The errors are occurring because webpack in Create React App doesn't handle the node:
protocol by default.
Let's fix these issues:
Since you're using Create React App, we need to customize the webpack configuration without ejecting. We'll use react-app-rewired
for this.
npm install --save-dev react-app-rewired buffer crypto-browserify events path-browserify process stream-browserify util
config-overrides.js
file in your project root with the content provided above.package.json
scripts to use react-app-rewired
instead of react-scripts
.react-app-rewired
allows you to customize webpack configuration without ejecting from Create React App.This should resolve the errors you're seeing with the Node.js modules. If you need to implement the actual form submission functionality, you'll need to create a backend API endpoint to handle the form data and then use fetch or axios to send the data to that endpoint.
ok error solved but i dont see the datas in google sheet https://docs.google.com/spreadsheets/d/1_Gw4hXWdLIFMWPsuT5lpSfxJREptJILRwacCu7ZjhhU/edit?pli=1&gid=0#gid=0 check and solve it in this prompt no more prompts