Hi, I have an error while following the NextJS learn on Chapter 15 : Adding Authentication.
Error on UI :
./node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
> <!doctype html>
| <html>
| <head>
Error on console :
Module not found: Can't resolve 'fs'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/@mapbox/node-pre-gyp/lib/ sync ^\.\/.*$
./node_modules/@mapbox/node-pre-gyp/lib/node-pre-gyp.js
./node_modules/bcrypt/bcrypt.js
./auth.ts
./action.ts
./app/ui/login-form.tsx
Is it maybe because I have no WSL Installed?
My Device :
OS : Win 11,
Memory : 16gb,
Node version : 18.17
This error appear after I have complete all guides on Chapter 15, and want to test the authentication by my self.