Cannot find module '@napi-rs/simple-git-linux-x64-gnu'

Hi again 🙂 I'm trying to deploy a Nextjs project to Pages, a different one to my previous thread. However, this one fails because of the following error:
13:24:40.598 â–² - info Linting and checking validity of types...
13:24:43.061 â–² - info Creating an optimized production build...
13:24:45.133 â–² unhandledRejection Error: Cannot find module '@napi-rs/simple-git-linux-x64-gnu'
13:24:45.133 â–² Require stack:
13:24:45.133 â–² - /opt/buildhome/repo/node_modules/@napi-rs/simple-git/index.js
13:24:45.134 â–² at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
13:24:45.134 â–² at /opt/buildhome/repo/node_modules/next/dist/server/require-hook.js:188:36
13:24:45.134 â–² at Module._load (node:internal/modules/cjs/loader:920:27)
13:24:45.134 â–² at Module.require (node:internal/modules/cjs/loader:1141:19)
13:24:45.134 â–² at require (node:internal/modules/cjs/helpers:110:18)
13:24:45.134 â–² at Object.<anonymous> (/opt/buildhome/repo/node_modules/@napi-rs/simple-git/index.js:174:31)
13:24:45.134 â–² at Module._compile (node:internal/modules/cjs/loader:1254:14)
13:24:45.135 â–² at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
13:24:45.135 â–² at Module.load (node:internal/modules/cjs/loader:1117:32)
13:24:45.135 â–² at Module._load (node:internal/modules/cjs/loader:958:12) {
13:24:45.135 â–² code: 'MODULE_NOT_FOUND',
13:24:45.135 â–² requireStack: [ '/opt/buildhome/repo/node_modules/@napi-rs/simple-git/index.js' ]
13:24:45.135 â–² }
13:24:45.259 â–² Error: Command "npm run build" exited with 1
13:24:40.598 â–² - info Linting and checking validity of types...
13:24:43.061 â–² - info Creating an optimized production build...
13:24:45.133 â–² unhandledRejection Error: Cannot find module '@napi-rs/simple-git-linux-x64-gnu'
13:24:45.133 â–² Require stack:
13:24:45.133 â–² - /opt/buildhome/repo/node_modules/@napi-rs/simple-git/index.js
13:24:45.134 â–² at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
13:24:45.134 â–² at /opt/buildhome/repo/node_modules/next/dist/server/require-hook.js:188:36
13:24:45.134 â–² at Module._load (node:internal/modules/cjs/loader:920:27)
13:24:45.134 â–² at Module.require (node:internal/modules/cjs/loader:1141:19)
13:24:45.134 â–² at require (node:internal/modules/cjs/helpers:110:18)
13:24:45.134 â–² at Object.<anonymous> (/opt/buildhome/repo/node_modules/@napi-rs/simple-git/index.js:174:31)
13:24:45.134 â–² at Module._compile (node:internal/modules/cjs/loader:1254:14)
13:24:45.135 â–² at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
13:24:45.135 â–² at Module.load (node:internal/modules/cjs/loader:1117:32)
13:24:45.135 â–² at Module._load (node:internal/modules/cjs/loader:958:12) {
13:24:45.135 â–² code: 'MODULE_NOT_FOUND',
13:24:45.135 â–² requireStack: [ '/opt/buildhome/repo/node_modules/@napi-rs/simple-git/index.js' ]
13:24:45.135 â–² }
13:24:45.259 â–² Error: Command "npm run build" exited with 1
Locally, it builds fine but it doesn't on Pages. The repo is available here: https://github.com/spectate/docs Thanks!
GitHub
GitHub - spectate/docs: Platform documentation of Spectate.
Platform documentation of Spectate. Contribute to spectate/docs development by creating an account on GitHub.
5 Replies
Bjarn
BjarnOP•2y ago
One note; this project deployed fine last time it did a deploy, which was still [email protected] I just can't seem to be able to get this project to deploy again. I have tried migrating to NPM, Yarn v3 and even installed the missing deps myself, no luck:
Bjarn
BjarnOP•2y ago
Bjarn
BjarnOP•2y ago
Using the beta build image, also tried the stable "v1" with no luck.
Bjarn
BjarnOP•2y ago
also fails locally with next-on-pages here
Bjarn
BjarnOP•2y ago
Wow, idk what it was tbh - latest commit fixed it. Reverted back to NPM and it magically works.
Want results from more Discord servers?
Add your server