node.bcrypt.js icon indicating copy to clipboard operation
node.bcrypt.js copied to clipboard

ModuleNotFoundError: No module named 'filecmp'

Open Zsmith32 opened this issue 2 years ago • 0 comments

  • What went wrong? When installing bcrypt 5.0.1 with yarn sometimes the install fails other times it succeeds. It seems random.

This is the error from the runs that it fails it's always No Module name 'filecamp'. The odd behavior is I run the exact same install command (yarn install or yarn workspaces focus --production) and the install sometimes succeeds with no changes to anything.

Traceback (most recent call last): File "/node_modules/node-gyp/gyp/gyp_main.py", line 42, in import gyp # noqa: E402 File "node_modules/node-gyp/gyp/pylib/gyp/init.py", line 9, in import gyp.input File "/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 8, in import gyp.common File "/node_modules/node-gyp/gyp/pylib/gyp/common.py", line 6, in import filecmp ModuleNotFoundError: No module named 'filecmp' gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/node_modules/node-gyp/lib/configure.js:261:16) gyp ERR! stack at ChildProcess.emit (events.js:400:28) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12) gyp ERR! System Linux 5.10.76-linuxkit gyp ERR! command "/usr/bin/node" "/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/node_modules/bcrypt/lib/binding/napi-v3" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3" gyp ERR! cwd /node_modules/bcrypt gyp ERR! node -v v14.20.0 gyp ERR! node-gyp -v v9.0.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/node_modules/bcrypt/lib/binding/napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1) node-pre-gyp ERR! stack at ChildProcess. (/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:400:28) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1088:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5) node-pre-gyp ERR! System Linux 5.10.76-linuxkit

This is a problem for our CI because it's producing random failures and we have to run the pipeline a random amount of times to get a passing build.

  • Which version of nodejs and OS? node: v14.20.0 OS: 20.04.4 LTS (Focal Fossa)

Zsmith32 avatar Aug 05 '22 17:08 Zsmith32