Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

webpack scrypt.js: Critical dependency: the request of a dependency is an expression #3018

@dankins

Description

@dankins

Description

Building on v.1.2.1 using create-react-app fails due to webpack warning /node_modules/web3-eth-accounts/src/scrypt.js Critical dependency: the request of a dependency is an expression" when CI=true (ie, fail on warnings)

Expected behavior

Building a create-react-app using webpack should succeed

Actual behavior

I am able to build everything locally, however the build fails in my CI environment. The warning is as follows:

/node_modules/web3-eth-accounts/src/scrypt.js
Critical dependency: the request of a dependency is an expression

I assume it is a result of this line:
https://github.com/ethereum/web3.js/blob/1.x/packages/web3-eth-accounts/src/scrypt.js#L17

Steps to reproduce the behavior

Error Logs

Creating an optimized production build...

Treating warnings as errors because process.env.CI = true.
Most CI servers set it automatically.

Failed to compile.

/home/circleci/project/node_modules/web3-eth-accounts/src/scrypt.js
Critical dependency: the request of a dependency is an expression


info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lerna ERR! yarn run build stderr:
error Command failed with exit code 1.

Gists

Versions

  • web3.js: v1.2.1
  • nodejs: v10.16.0
  • browser: circleci
  • ethereum node:

Metadata

Metadata

Labels

1.x1.0 related issuesBugAddressing a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions