Deploy Nuxt 2 SSR failed

hey guys!
I’m trying to deploy and it’s returning the error below:

Nuxt 2 SSR

Nuxt.config.js

server: {
port: 9199,
},

target: ‘server’,

mode: ‘universal’,

ssr: true,

Error:

Build App 20230504124546425
Env path /home/cleavr/edvzaaquidapuuya7681.cleaver.rocks/releases/20230504124546425/.env is already linked to /home/cleavr/edvzaaquidapuuya7681.cleaver.rocks/.env
Building the assets using NITRO_PRESET=cleavr npm run build --production …
npm WARN config production Use --omit=dev instead.

seeducar_nuxt@1.0.0 build
nuxt build

WARN mode option is deprecated. You can safely remove it from nuxt.config

WARN Module @nuxt/content is disabled due to incompatibility issues:

  • [nuxt] Nuxt version ^3.0.0-rc.3 is required but currently using 2.16.3

WARN Module @nuxtjs/robots is disabled due to incompatibility issues:

  • [bridge] Nuxt bridge is required

:information_source: Production build
:information_source: Bundling for server and client side
:information_source: Target: server
:heavy_check_mark: Builder initialized
:heavy_check_mark: Nuxt files generated
:information_source: Compiling Client
:heavy_check_mark: Client: Compiled successfully in 3.83m
:information_source: Compiling Server

<— Last few GCs —>

[25970:0x4c4b210] 291405 ms: Mark-sweep (reduce) 475.9 (493.9) → 474.6 (493.9) MB, 1617.1 / 0.1 ms (average mu = 0.132, current mu = 0.032) failure allocation scavenge might not succeed
[25970:0x4c4b210] 293129 ms: Mark-sweep (reduce) 475.8 (493.9) → 474.8 (493.9) MB, 1667.1 / 0.1 ms (average mu = 0.084, current mu = 0.033) failure allocation scavenge might not succeed

<— JS stacktrace —>

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0xb090e0 node::Abort() [node]
2: 0xa1b70e [node]
3: 0xce19d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xce1d77 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xe993e5 [node]
6: 0xe99ec6 [node]
7: 0xea83ee [node]
8: 0xea8e30 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
9: 0xeabdae v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xe6d2ea v8::internal::factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
11: 0x11e6196 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
12: 0x15d9e19 [node]
Aborted (core dumped)

Hello @gabrielmoraesp and welcome to the Cleavr community!

I see you also submitted a support request for this same issue. The main issue here is the:

This basically means your server is running out of memory to complete the build step. There are a couple of option to get around this:

  1. Use Clean Disk space feature and delete old deployments to free up space Clean Disk Space - Cleavr docs
  2. Use GitHub Actions to build the project via GitHub to save your server resources - GitHub Actions - Cleavr docs
  3. Upgrade your server or provision a new server with more beefy specs

I hope this helps and please let us know if you run into any other issues.

Thanks a lot for the help!
I changed the server configuration.
Now I have another problem. It is returning the error below when accessing the temporary url of the site.

When I access the index.html via url, it even shows the content, but without styles and everything.
https://w6xcn3uq6pft07rk7682.cleaver.live/index.html

I think this is likely due to the nuxt/content error that was on build - I saw it was disabled due to incompatibility. Probably one of the better places to look at for a helpful error is in server > services > click on heartbead for Node JS. This will also show PM2 errors which is pretty good at telling you why a node-based application is failing.

In this instance, I’d recommend looking into the nuxt/content compatibility issue first.

So, the log below appears for me.
The strange thing is that in vercel or cleavr I can run the application in ssr. In vercel it works, but not with ssr.

Versions:
NodeJS: v16.20.0
NPM: 8.19.4
Yarn: 1.22.19
PM2: 5.3.0

PM2 Status:
┌────┬──────────────────────────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼──────────────────────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ w6xcn3uq6pft07rk7682.cleaver.live │ default │ 1.0.0 │ cluster │ 52747 │ 5m │ 0 │ online │ 0% │ 91.7mb │ cleavr │ disabled │
└────┴──────────────────────────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
[TAILING] Tailing last 30 lines for [all] processes (change the value with --lines option)
/opt/pm2/pm2.log last 30 lines:
PM2 | 2023-05-04T02:50:27: PM2 log: App name:w6xcn3uq6pft07rk7682.cleaver.live id:_old_0 disconnected
PM2 | 2023-05-04T02:50:27: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:_old_0] exited with code [0] via signal [SIGINT]
PM2 | 2023-05-04T02:50:27: PM2 log: pid=45710 msg=process killed
PM2 | 2023-05-04T02:57:30: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:0] starting in -cluster mode-
PM2 | 2023-05-04T02:57:30: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:0] online
PM2 | 2023-05-04T02:57:32: PM2 log: -reload- New worker listening
PM2 | 2023-05-04T02:57:32: PM2 log: Stopping app:w6xcn3uq6pft07rk7682.cleaver.live id:_old_0
PM2 | 2023-05-04T02:57:33: PM2 log: App name:w6xcn3uq6pft07rk7682.cleaver.live id:_old_0 disconnected
PM2 | 2023-05-04T02:57:33: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:_old_0] exited with code [0] via signal [SIGINT]
PM2 | 2023-05-04T02:57:33: PM2 log: pid=47878 msg=process killed
PM2 | 2023-05-04T03:09:55: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:0] starting in -cluster mode-
PM2 | 2023-05-04T03:09:55: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:0] online
PM2 | 2023-05-04T03:09:57: PM2 log: -reload- New worker listening
PM2 | 2023-05-04T03:09:57: PM2 log: Stopping app:w6xcn3uq6pft07rk7682.cleaver.live id:_old_0
PM2 | 2023-05-04T03:09:57: PM2 log: App name:w6xcn3uq6pft07rk7682.cleaver.live id:_old_0 disconnected
PM2 | 2023-05-04T03:09:57: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:_old_0] exited with code [0] via signal [SIGINT]
PM2 | 2023-05-04T03:09:57: PM2 log: pid=49100 msg=process killed
PM2 | 2023-05-04T03:21:28: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:0] starting in -cluster mode-
PM2 | 2023-05-04T03:21:28: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:0] online
PM2 | 2023-05-04T03:21:31: PM2 log: -reload- New worker listening
PM2 | 2023-05-04T03:21:31: PM2 log: Stopping app:w6xcn3uq6pft07rk7682.cleaver.live id:_old_0
PM2 | 2023-05-04T03:21:31: PM2 log: App name:w6xcn3uq6pft07rk7682.cleaver.live id:_old_0 disconnected
PM2 | 2023-05-04T03:21:31: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:_old_0] exited with code [0] via signal [SIGINT]
PM2 | 2023-05-04T03:21:31: PM2 log: pid=51335 msg=process killed
PM2 | 2023-05-04T03:21:31: PM2 log: Stopping app:w6xcn3uq6pft07rk7682.cleaver.live id:0
PM2 | 2023-05-04T03:21:31: PM2 log: App name:w6xcn3uq6pft07rk7682.cleaver.live id:0 disconnected
PM2 | 2023-05-04T03:21:31: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:0] exited with code [0] via signal [SIGINT]
PM2 | 2023-05-04T03:21:32: PM2 log: pid=52709 msg=process killed
PM2 | 2023-05-04T03:21:32: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:0] starting in -cluster mode-
PM2 | 2023-05-04T03:21:32: PM2 log: App [w6xcn3uq6pft07rk7682.cleaver.live:0] online

/opt/pm2/logs/w6xcn3uq6pft07rk7682.cleaver.live-out-0.log last 30 lines:
/opt/pm2/logs/w6xcn3uq6pft07rk7682.cleaver.live-error-0.log last 30 lines:
0|w6xcn3uq | odules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)\n",“timestamp”:“2023-05-04T03:03:40.183Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[error] Request failed with status code 401\n at createError (node_modules/axios/lib/core/createError.js:16:15)\n at settle (node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)\n",“timestamp”:“2023-05-04T03:03:40.375Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[error] Request failed with status code 401\n at createError (node_modules/axios/lib/core/createError.js:16:15)\n at settle (node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)\n",“timestamp”:“2023-05-04T03:05:38.013Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[error] Request failed with status code 401\n at createError (node_modules/axios/lib/core/createError.js:16:15)\n at settle (node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)\n",“timestamp”:“2023-05-04T03:06:58.264Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[error] Request failed with status code 401\n at createError (node_modules/axios/lib/core/createError.js:16:15)\n at settle (node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)\n",“timestamp”:“2023-05-04T03:06:59.423Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[warn] Module @nuxt/content is disabled due to incompatibility issues:\n - [nuxt] Nuxt version ^3.0.0-rc.3 is required but currently using 2.16.3\n",“timestamp”:“2023-05-04T03:09:57.207Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[warn] Module @nuxtjs/robots is disabled due to incompatibility issues:\n - [bridge] Nuxt bridge is required\n",“timestamp”:“2023-05-04T03:09:57.348Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[error] Request failed with status code 401\n at createError (node_modules/axios/lib/core/createError.js:16:15)\n at settle (node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)\n",“timestamp”:“2023-05-04T03:09:58.867Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[error] Request failed with status code 401\n at createError (node_modules/axios/lib/core/createError.js:16:15)\n at settle (node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)\n",“timestamp”:“2023-05-04T03:10:22.004Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[error] Request failed with status code 401\n at createError (node_modules/axios/lib/core/createError.js:16:15)\n at settle (node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.handleStreamEnd (node_modules/axios/lib/adapters/http.js:269:11)\n at IncomingMessage.emit (node:events:525:35)\n at endReadableNT (node:internal/streams/readable:1358:12)\n at processTicksAndRejections (node:internal/process/task_queues:83:21)\n",“timestamp”:“2023-05-04T03:10:23.326Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[warn] Module @nuxt/content is disabled due to incompatibility issues:\n - [nuxt] Nuxt version ^3.0.0-rc.3 is required but currently using 2.16.3\n",“timestamp”:“2023-05-04T03:21:30.686Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[warn] Module @nuxtjs/robots is disabled due to incompatibility issues:\n - [bridge] Nuxt bridge is required\n",“timestamp”:“2023-05-04T03:21:30.838Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[warn] Module @nuxt/content is disabled due to incompatibility issues:\n - [nuxt] Nuxt version ^3.0.0-rc.3 is required but currently using 2.16.3\n",“timestamp”:“2023-05-04T03:21:34.313Z”,“type”:“err”,“process_id”:0,“app_name”:“w6xcn3uq6pft07rk7682.cleaver.live”}
0|w6xcn3uq | {“message”:"[warn] Module @nuxtjs/robots is disabled due to incompatibility issues:\n - [bridge] Nuxt bridge is required\n",“timestamp”:“2023-05-04T03:21:34.518Z”,“type”:“err”,“process_id”:0,“app_name”:"w6xcn3uq6pft07rk7682.c

When using @nuxt/content , the message that appears is a warning and not an error.

There is an Axios error as well:

0|w6xcn3uq | {“message”:"[error] Request failed with status code 401\n at createError (node_modules/axios/lib/core/createError.js:16:15)\n at settle