ERROR in ./src/contexts/authContext.js 6:0-30
Module not found: Error: Can't resolve 'os' in 'C:\Users\MKKIM\Desktop\ts-reddit\my-app\src\contexts'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for
it.
If you want to include a polyfill, you need to:
add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "os": false }
resolve 'os' in 'C:\Users\MKKIM\Desktop\ts-reddit\my-app\src\contexts'
Parsed request is a module
using description file: C:\Users\MKKIM\Desktop\ts-reddit\my-app\package.json (relative path: ./src/contexts)
Field 'browser' doesn't contain a valid alias configuration
resolve as module
C:\Users\MKKIM\Desktop\ts-reddit\my-app\src\contexts\node_modules doesn't exist or is not a directory
C:\Users\MKKIM\Desktop\ts-reddit\my-app\src\node_modules doesn't exist or is not a directory
looking for modules in C:\Users\MKKIM\Desktop\ts-reddit\my-app\node_modules
single file module
using description file: C:\Users\MKKIM\Desktop\ts-reddit\my-app\package.json (relative path: ./node_modules/os)
no extension
Field 'browser' doesn't contain a valid alias configuration
C:\Users\MKKIM\Desktop\ts-reddit\my-app\node_modules\os doesn't exist
.web.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\MKKIM\Desktop\ts-reddit\my-app\node_modules\os.web.mjs doesn't exist
.mjs
Field 'browser' doesn't contain a valid alias configuration
C:\Users\MKKIM\Desktop\ts-reddit\my-app\node_modules\os.mjs doesn't exist
.web.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\MKKIM\Desktop\ts-reddit\my-app\node_modules\os.web.js doesn't exist
.js
Field 'browser' doesn't contain a valid alias configuration
C:\Users\MKKIM\Desktop\ts-reddit\my-app\node_modules\os.js doesn't exist
.web.ts
ERROR in ./src/contexts/authContext.js 6:0-30 Module not found: Error: Can't resolve 'os' in 'C:\Users\MKKIM\Desktop\ts-reddit\my-app\src\contexts'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
single file module using description file: C:\Users\MKKIM\Desktop\ts-reddit\my-app\package.json (relative path: ./node_modules/os) no extension Field 'browser' doesn't contain a valid alias configuration C:\Users\MKKIM\Desktop\ts-reddit\my-app\node_modules\os doesn't exist
.web.mjs Field 'browser' doesn't contain a valid alias configuration C:\Users\MKKIM\Desktop\ts-reddit\my-app\node_modules\os.web.mjs doesn't exist .mjs Field 'browser' doesn't contain a valid alias configuration C:\Users\MKKIM\Desktop\ts-reddit\my-app\node_modules\os.mjs doesn't exist .web.js Field 'browser' doesn't contain a valid alias configuration C:\Users\MKKIM\Desktop\ts-reddit\my-app\node_modules\os.web.js doesn't exist .js Field 'browser' doesn't contain a valid alias configuration C:\Users\MKKIM\Desktop\ts-reddit\my-app\node_modules\os.js doesn't exist
.web.ts