Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
Most likely due to cross-platform development. Looks like there's an impending fix on the linked issue. For now, try npm update and push new package-lock.json from platform that matches Vercel deployment.
Full log:
[19:19:07.486] Cloning github.com/sec-ml/nought (Branch: main, Commit: 9e2338a)
[19:19:07.652] Previous build caches not available
[19:19:07.720] Cloning completed: 233.000ms
[19:19:07.874] Running build in Washington, D.C., USA (East) – iad1
[19:19:08.014] Running "vercel build"
[19:19:08.404] Vercel CLI 41.4.1
[19:19:08.953] Installing dependencies...
[19:19:14.598]
[19:19:14.598] added 318 packages in 5s
[19:19:14.598]
[19:19:14.598] 165 packages are looking for funding
[19:19:14.598] run `npm fund` for details
[19:19:14.643] Running "npm run build"
[19:19:14.762]
[19:19:14.763] > nought@0.0.1 build
[19:19:14.763] > astro build
[19:19:14.763]
[19:19:15.421] Error: Cannot find module @rollup/rollup-linux-x64-gnu. npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). Please try `npm i` again after removing both package-lock.json and node_modules directory.
[19:19:15.421] at requireWithFriendlyError (/vercel/path0/node_modules/rollup/dist/native.js:64:9)
[19:19:15.422] at Object.<anonymous> (/vercel/path0/node_modules/rollup/dist/native.js:73:76)
[19:19:15.422] at Module._compile (node:internal/modules/cjs/loader:1554:14)
[19:19:15.422] at Object..js (node:internal/modules/cjs/loader:1706:10)
[19:19:15.422] at Module.load (node:internal/modules/cjs/loader:1289:32)
[19:19:15.422] at Function._load (node:internal/modules/cjs/loader:1108:12)
[19:19:15.422] at TracingChannel.traceSync (node:diagnostics_channel:322:14)
[19:19:15.422] at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
[19:19:15.422] at cjsLoader (node:internal/modules/esm/translators:262:5)
[19:19:15.422] at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:196:7) {
[19:19:15.422] [cause]: Error: Cannot find module '@rollup/rollup-linux-x64-gnu'
[19:19:15.422] Require stack:
[19:19:15.422] - /vercel/path0/node_modules/rollup/dist/native.js
[19:19:15.423] at Function._resolveFilename (node:internal/modules/cjs/loader:1225:15)
[19:19:15.423] at Function._load (node:internal/modules/cjs/loader:1055:27)
[19:19:15.423] at TracingChannel.traceSync (node:diagnostics_channel:322:14)
[19:19:15.423] at wrapModuleLoad (node:internal/modules/cjs/loader:220:24)
[19:19:15.423] at Module.require (node:internal/modules/cjs/loader:1311:12)
[19:19:15.423] at require (node:internal/modules/helpers:136:16)
[19:19:15.423] at requireWithFriendlyError (/vercel/path0/node_modules/rollup/dist/native.js:46:10)
[19:19:15.423] at Object.<anonymous> (/vercel/path0/node_modules/rollup/dist/native.js:73:76)
[19:19:15.423] at Module._compile (node:internal/modules/cjs/loader:1554:14)
[19:19:15.423] at Object..js (node:internal/modules/cjs/loader:1706:10) {
[19:19:15.423] code: 'MODULE_NOT_FOUND',
[19:19:15.423] requireStack: [ '/vercel/path0/node_modules/rollup/dist/native.js' ]
[19:19:15.423] }
[19:19:15.423] }
[19:19:15.437] Error: Command "npm run build" exited with 1
[19:19:15.666]
Most likely due to cross-platform development. Looks like there's an impending fix on the linked issue. For now, try
npm updateand push newpackage-lock.jsonfrom platform that matches Vercel deployment.Full log: