Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Pipeline error: Cannot find module '@nx/nx-linux-x64-gnu'

Jorge Vázquez Saborido
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 15, 2024
Suddenly I'm getting this error when running a pipeline that always worked fine. Error appear just after running an install script with npm.

 

 

npm ERR! code 1

npm ERR! path /opt/atlassian/pipelines/agent/build/node_modules/nx

npm ERR! command failed

npm ERR! command sh -c node ./bin/post-install

npm ERR! /opt/atlassian/pipelines/agent/build/node_modules/nx/src/native/native-bindings.js:244

npm ERR! throw loadError

npm ERR! ^

npm ERR!

npm ERR! Error: Cannot find module '@nx/nx-linux-x64-gnu'

npm ERR! Require stack:

npm ERR! - /opt/atlassian/pipelines/agent/build/node_modules/nx/src/native/index.js

npm ERR! - /opt/atlassian/pipelines/agent/build/node_modules/nx/src/hasher/node-task-hasher-impl.js

npm ERR! - /opt/atlassian/pipelines/agent/build/node_modules/nx/src/hasher/task-hasher.js

npm ERR! - /opt/atlassian/pipelines/agent/build/node_modules/nx/src/hasher/hash-task.js

npm ERR! - /opt/atlassian/pipelines/agent/build/node_modules/nx/src/tasks-runner/run-command.js

npm ERR! - /opt/atlassian/pipelines/agent/build/node_modules/nx/src/nx-cloud/utilities/get-cloud-options.js

npm ERR! - /opt/atlassian/pipelines/agent/build/node_modules/nx/bin/post-install.js

npm ERR! at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)

npm ERR! at Function.resolve (node:internal/modules/helpers:190:19)

npm ERR! at Module._load (/opt/atlassian/pipelines/agent/build/node_modules/nx/src/native/index.js:53:36)

npm ERR! at Module.require (node:internal/modules/cjs/loader:1233:19)

npm ERR! at require (node:internal/modules/helpers:179:18)

npm ERR! at Object.<anonymous> (/opt/atlassian/pipelines/agent/build/node_modules/nx/src/native/native-bindings.js:184:31)

npm ERR! at Module._compile (node:internal/modules/cjs/loader:1358:14)

npm ERR! at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)

npm ERR! at Module.load (node:internal/modules/cjs/loader:1208:32)

npm ERR! at Module._load (node:internal/modules/cjs/loader:1024:12) {

npm ERR! code: 'MODULE_NOT_FOUND',

npm ERR! requireStack: [

npm ERR! '/opt/atlassian/pipelines/agent/build/node_modules/nx/src/native/index.js',

npm ERR! '/opt/atlassian/pipelines/agent/build/node_modules/nx/src/hasher/node-task-hasher-impl.js',

npm ERR! '/opt/atlassian/pipelines/agent/build/node_modules/nx/src/hasher/task-hasher.js',

npm ERR! '/opt/atlassian/pipelines/agent/build/node_modules/nx/src/hasher/hash-task.js',

npm ERR! '/opt/atlassian/pipelines/agent/build/node_modules/nx/src/tasks-runner/run-command.js',

npm ERR! '/opt/atlassian/pipelines/agent/build/node_modules/nx/src/nx-cloud/utilities/get-cloud-options.js',

npm ERR! '/opt/atlassian/pipelines/agent/build/node_modules/nx/bin/post-install.js'

npm ERR! ]

npm ERR! }

npm ERR!

npm ERR! Node.js v20.13.1

1 answer

2 votes
Jorge Vázquez Saborido
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 15, 2024

After many attempts, I discovered that Lerna has "nx" as a dependency. I found that it works with version 18.0.4 but crashes with version 19.0.4. Although it is not a direct dependency of my package, I had to add the working version as fixed in my package.json. Strange...

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events