Skip to content
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

Build issue #357

Open
UmaMuthu opened this issue Nov 12, 2019 · 2 comments
Open

Build issue #357

UmaMuthu opened this issue Nov 12, 2019 · 2 comments

Comments

@UmaMuthu
Copy link

UmaMuthu commented Nov 12, 2019

react-app-rewired build
has these warning while building the code
./node_modules/log-utils/node_modules/ansi-colors/index.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

./node_modules/create-frame/utils.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

./node_modules/handlebars-helpers/lib/utils/utils.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

in the browser getting this error
cannot find module falsey, create-frame,is-number

[email protected]

config-overides.js
const {
override,
addDecoratorsLegacy
} = require("customize-cra");
const enableRequireEnsure = () => config => {
config.output.globalObject = 'this'
config.module.rules[0].parser.requireEnsure = true
return config
}
module.exports = override(
addDecoratorsLegacy(),
enableRequireEnsure(),
);

@Joshmamroud
Copy link

@UmaMuthu were you ever able to fix this? If so, can you please share your solution?
Thanks!

@gruckion
Copy link

gruckion commented Oct 11, 2022

I found a work around.

import { DefinePlugin } from "webpack";

config.plugins = [
  // Stop build hanging https://github.com/node-formidable/formidable/issues/337#issuecomment-153408479
  new DefinePlugin({ "global.GENTLY": false }),
]

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

3 participants