Deplopyment Error on Vercel: Cannot find module '/vercel/workpath0/.next/server/scripts/build-rss.js' #19256
-
I have a {
"export": "next export",
"build": "next build && npm run export && npm run build:rss",
"build:rss": "node ./.next/server/scripts/build-rss.js",
"start": "next start",
} It has > node ./.next/server/scripts/build-rss.js
15:14:05.786 internal/modules/cjs/loader.js:968
15:14:05.786 throw err;
15:14:05.786 ^
15:14:05.786 Error: Cannot find module '/vercel/workpath0/.next/server/scripts/build-rss.js'
15:14:05.786 at Function.Module._resolveFilename (internal/modules/cjs/loader.js:965:15)
15:14:05.786 at Function.Module._load (internal/modules/cjs/loader.js:841:27)
15:14:05.786 at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
15:14:05.786 at internal/main/run_main_module.js:17:47 { I tried asking Vercel support but they said:
Not sure the link is relevant :( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The solution is to use So {
"build:rss": "node ./.next/serverless/scripts/build-rss.js",
} |
Beta Was this translation helpful? Give feedback.
The solution is to use
serverless
instead ofserver
as Vercel is Serverless :)So
build:rss
becomes: