Skip to content

"Process is not defined" after webpack was upgraded from version 4 to 5 #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
miedzikd opened this issue Feb 16, 2021 · 1 comment
Open

Comments

@miedzikd
Copy link

Hi :) At start I want to say thank you for your great work!

Today I tried to upgrade webpack to v5 ... Unfortunately, I get this error. Can anyone suggest how to solve it?

Uncaught ReferenceError: process is not defined
    at Object../node_modules/uniqid/index.js (index.js:14)
    at __webpack_require__ (bootstrap:18)
    at Object../node_modules/react-lightgallery/dist/index.js (index.js:1)
    at __webpack_require__ (bootstrap:18)
    at Module../assets/react/simple-website/Components/Templates/Basic/Basic.tsx (index.ts:18)
    at __webpack_require__ (bootstrap:18)
    at Module../assets/react/simple-website/SimpleWebsite.tsx (assets_react_simple-website_SimpleWebsite_tsx.js:3761)
    at Function.__webpack_require__ (bootstrap:18)

image

@davidnewcomb
Copy link

I have this problem too and tracked it down to this:

browserify/commonjs-assert#55
This is caused by webpack 5 being broken, and not polyfilling node globals by default. You’ll have to fix it by adding stuff to your config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants