You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We run an npm workspaces-based monorepo, of which one of the packages is our documentation project, running on Nextra, which has a dependency on @napi-rs/simple-git.
Our build pipeline has been failing seemingly randomly due to the following build issue:
> documentation@1.0.0 build
> next build
Linting and checking validity of types ...
Creating an optimized production build ...
[nextra] Found "_app.tsx" file, refactor it to "_app.mdx" for better performance.
unhandledRejection Error: Cannot find module '@napi-rs/simple-git-linux-x64-gnu'
Require stack:
- /opt/atlassian/pipelines/agent/build/node_modules/@napi-rs/simple-git/index.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
at /opt/atlassian/pipelines/agent/build/node_modules/next/dist/server/require-hook.js:54:36
at Function.Module._load (node:internal/modules/cjs/loader:873:27)
at Module.require (node:internal/modules/cjs/loader:1100:19)
at Module.mod.require (/opt/atlassian/pipelines/agent/build/node_modules/next/dist/server/require-hook.js:64:28)
at require (node:internal/modules/cjs/helpers:119:18)
at Object.<anonymous> (/opt/atlassian/pipelines/agent/build/node_modules/@napi-rs/simple-git/index.js:190:31)
at Module._compile (node:internal/modules/cjs/loader:1198:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
at Module.load (node:internal/modules/cjs/loader:1076:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/opt/atlassian/pipelines/agent/build/node_modules/@napi-rs/simple-git/index.js'
]
}
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: documentation@1.0.0
npm ERR! at location: /opt/atlassian/pipelines/agent/build/apps/documentation
So it's having trouble finding the "@napi-rs/simple-git-linux-x64-gnu" package. This build pipeline in a Bitbucket pipeline, which use linux-x64 to my knowledge.
This error comes seemingly out of nowhere on our feature branches, we have not yet been able to narrow it down to any types of changes in particular.
So far, the only workaorunds we have found to this issue are:
Deleting package-lock.json and regenerating it (of course we are not using this method, but it does solve the build issue).
Creating a new branch from dev and copying over all the changes from the broken branch to the newly created one. For whatever reason this solves the issue and are once again able to build the pipeline.
We have not yet been able to reproduce the issue on our local machines, it only occurs in Bitbucket pipelines.
This is the package.json of the documentation package:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We run an npm workspaces-based monorepo, of which one of the packages is our documentation project, running on Nextra, which has a dependency on @napi-rs/simple-git.
Our build pipeline has been failing seemingly randomly due to the following build issue:
So it's having trouble finding the "@napi-rs/simple-git-linux-x64-gnu" package. This build pipeline in a Bitbucket pipeline, which use linux-x64 to my knowledge.
This error comes seemingly out of nowhere on our feature branches, we have not yet been able to narrow it down to any types of changes in particular.
So far, the only workaorunds we have found to this issue are:
We have not yet been able to reproduce the issue on our local machines, it only occurs in Bitbucket pipelines.
This is the package.json of the documentation package:
Any pointers would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions