timlrx/tailwind-nextjs-starter-blog

Deploy to the vercel pages did not work!

Closed this issue · 5 comments

I try to deploy to vercel but the site didn't deploy in vercel. Did anyone else facing the same issue?

I try to deploy from the button on the markdowns of the project the button dont allow me to deploy a new project too?

Error should up:

[23:11:48.030] Running build in Washington, D.C., USA (East) – iad1
[23:11:50.360] Cloning github.com/heyjumanji/jumanjiblogs (Branch: main, Commit: 617fbbf)
[23:11:50.878] Previous build cache not available
[23:11:51.625] Cloning completed: 1.264s
[23:11:51.957] Running "vercel build"
[23:11:52.375] Vercel CLI 39.2.0
[23:11:52.758] Installing dependencies...
[23:11:56.163] ➤ YN0000: ┌ Resolution step
[23:11:56.412] ➤ YN0002: │ @algolia/autocomplete-core@npm:1.9.3 doesn't provide @algolia/client-search (pbc410), requested by @algolia/autocomplete-shared
[23:11:56.413] ➤ YN0002: │ @algolia/autocomplete-core@npm:1.9.3 doesn't provide algoliasearch (p8ad5b), requested by @algolia/autocomplete-shared
[23:11:56.413] ➤ YN0002: │ @algolia/autocomplete-core@npm:1.9.3 doesn't provide search-insights (pfdb70), requested by @algolia/autocomplete-plugin-algolia-insights
[23:11:56.413] ➤ YN0002: │ @algolia/autocomplete-plugin-algolia-insights@npm:1.9.3 [e43f4] doesn't provide @algolia/client-search (pdf3b9), requested by @algolia/autocomplete-shared
[23:11:56.414] ➤ YN0002: │ @algolia/autocomplete-plugin-algolia-insights@npm:1.9.3 [e43f4] doesn't provide algoliasearch (p0f6bb), requested by @algolia/autocomplete-shared
[23:11:56.414] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (p22e89) with version 1.8.0, which doesn't satisfy what @opentelemetry/core requests
[23:11:56.414] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (pde20c) with version 1.8.0, which doesn't satisfy what @opentelemetry/resources requests
[23:11:56.414] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (p18e9a) with version 1.8.0, which doesn't satisfy what @opentelemetry/sdk-trace-base requests
[23:11:56.415] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (p31076) with version 1.8.0, which doesn't satisfy what @opentelemetry/exporter-trace-otlp-grpc and some of its descendants request
[23:11:56.415] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/exporter-trace-otlp-grpc (pbedd1) with version 0.48.0, which doesn't satisfy what @effect-ts/otel-exporter-trace-otlp-grpc requests
[23:11:56.415] ➤ YN0002: │ @docsearch/react@npm:3.6.0 [72311] doesn't provide @algolia/client-search (pc7191), requested by @algolia/autocomplete-preset-algolia
[23:11:56.415] ➤ YN0060: │ tailwind-nextjs-starter-blog@workspace:. provides react (p923c3) with version 18.2.0, which doesn't satisfy what pliny and some of its descendants request
[23:11:56.416] ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
[23:11:56.417] ➤ YN0000: └ Completed in 0s 254ms
[23:11:56.478] ➤ YN0000: ┌ Fetch step
[23:13:07.806] ➤ YN0066: │ typescript@patch:typescript@npm%3A5.4.3#~builtin<compat/typescript>::version=5.4.3&hash=14eedb: Cannot apply hunk #2
[23:13:07.843] ➤ YN0013: │ 34 packages were already cached, 1075 had to be fetched
[23:13:07.848] ➤ YN0000: └ Completed in 1m 12s
[23:13:07.929] ➤ YN0000: ┌ Link step
[23:13:21.382] ➤ YN0007: │ esbuild@npm:0.20.2 must be built because it never has been before or the last one failed
[23:13:21.383] ➤ YN0007: │ protobufjs@npm:7.2.6 must be built because it never has been before or the last one failed
[23:13:21.621] ➤ YN0007: │ contentlayer2@npm:0.4.4 must be built because it never has been before or the last one failed
[23:13:24.259] ➤ YN0000: └ Completed in 16s 330ms
[23:13:24.354] ➤ YN0000: Done with warnings in 1m 29s
[23:13:24.514] Detected Next.js version: 14.1.4
[23:13:24.517] Running "yarn run build"
[23:13:25.817] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[23:13:25.820] This information is used to shape Next.js' roadmap and prioritize features.
[23:13:25.820] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[23:13:25.820] https://nextjs.org/telemetry
[23:13:25.821] 
[23:13:25.905]    ▲ Next.js 14.1.4
[23:13:25.906]    - Environments: .env
[23:13:25.906] 
[23:13:25.979]    Creating an optimized production build ...
[23:13:27.729] (node:563) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
[23:13:27.729] (Use `node --trace-deprecation ...` to show where the warning was created)
[23:13:29.244] successCallback /vercel/path0/.contentlayer
[23:13:29.269] SuccessCallbackError {
[23:13:29.269]   error: SyntaxError: Unexpected identifier 'assert'
[23:13:29.270]       at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
[23:13:29.270]       at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
[23:13:29.270]       at ModuleLoader.#translate (node:internal/modules/esm/loader:437:12)
[23:13:29.270]       at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:484:27)
[23:13:29.270]       at ModuleJob._link (node:internal/modules/esm/module_job:115:19),
[23:13:29.270]   _tag: 'SuccessCallbackError',
[23:13:29.270]   toString: [Function (anonymous)],
[23:13:29.270]   [Symbol()]: {
[23:13:29.270]     error: SyntaxError: Unexpected identifier 'assert'
[23:13:29.270]         at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
[23:13:29.270]         at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
[23:13:29.270]         at ModuleLoader.#translate (node:internal/modules/esm/loader:437:12)
[23:13:29.270]         at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:484:27)
[23:13:29.270]         at ModuleJob._link (node:internal/modules/esm/module_job:115:19)
[23:13:29.270]   },
[23:13:29.270]   [Symbol()]: [ 'error' ]
[23:13:29.270] }
[23:13:29.339] Error: Command "yarn run build" exited with 1
[23:13:29.769] 

I found the same issue, here is my solution that works.

Replace this statement in scripts/rss.mjs:

import tagData from '../app/tag-data.json' assert { type: 'json' };

With these statements:

import fs from 'fs'
const tagData = JSON.parse(
  fs.readFileSync(new URL('../app/tag-data.json', import.meta.url), 'utf-8')
)

I think the root cause is the experimental feature in JavaScript that may not be fully supported by certain Node.js environments in Vercel.

I found the same issue, here is my solution that works.

Replace this statement in scripts/rss.mjs:

import tagData from '../app/tag-data.json' assert { type: 'json' };

With these statements:

import fs from 'fs'
const tagData = JSON.parse(
  fs.readFileSync(new URL('../app/tag-data.json', import.meta.url), 'utf-8')
)

I think the root cause is the experimental feature in JavaScript that may not be fully supported by certain Node.js environments in Vercel.

I have replaced as you said but i got another error!

The replacement i did here:

import { writeFileSync, mkdirSync } from 'fs'
import path from 'path'
import { slug } from 'github-slugger'
import { escape } from 'pliny/utils/htmlEscaper.js'
import siteMetadata from '../data/siteMetadata.js'
import fs from 'fs'
const tagData = JSON.parse(
  fs.readFileSync(new URL('../app/tag-data.json', import.meta.url), 'utf-8')
)
import { allBlogs } from '../.contentlayer/generated/index.mjs'
import { sortPosts } from 'pliny/utils/contentlayer.js'

const generateRssItem = (config, post) => `
  <item>
    <guid>${config.siteUrl}/blog/${post.slug}</guid>
    <title>${escape(post.title)}</title>
    <link>${config.siteUrl}/blog/${post.slug}</link>
    ${post.summary && `<description>${escape(post.summary)}</description>`}
    <pubDate>${new Date(post.date).toUTCString()}</pubDate>
    <author>${config.email} (${config.author})</author>
    ${post.tags && post.tags.map((t) => `<category>${t}</category>`).join('')}
  </item>
`

const generateRss = (config, posts, page = 'feed.xml') => `
  <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
      <title>${escape(config.title)}</title>
      <link>${config.siteUrl}/blog</link>
      <description>${escape(config.description)}</description>
      <language>${config.language}</language>
      <managingEditor>${config.email} (${config.author})</managingEditor>
      <webMaster>${config.email} (${config.author})</webMaster>
      <lastBuildDate>${new Date(posts[0].date).toUTCString()}</lastBuildDate>
      <atom:link href="${config.siteUrl}/${page}" rel="self" type="application/rss+xml"/>
      ${posts.map((post) => generateRssItem(config, post)).join('')}
    </channel>
  </rss>
`

async function generateRSS(config, allBlogs, page = 'feed.xml') {
  const publishPosts = allBlogs.filter((post) => post.draft !== true)
  // RSS for blog post
  if (publishPosts.length > 0) {
    const rss = generateRss(config, sortPosts(publishPosts))
    writeFileSync(`./public/${page}`, rss)
  }

  if (publishPosts.length > 0) {
    for (const tag of Object.keys(tagData)) {
      const filteredPosts = allBlogs.filter((post) =>
        post.tags.map((t) => slug(t)).includes(tag)
      )
      const rss = generateRss(config, filteredPosts, `tags/${tag}/${page}`)
      const rssPath = path.join('public', 'tags', tag)
      mkdirSync(rssPath, { recursive: true })
      writeFileSync(path.join(rssPath, page), rss)
    }
  }
}

const rss = () => {
  generateRSS(siteMetadata, allBlogs)
  console.log('RSS feed generated...')
}
export default rss

The error i got:

[01:03:00.770] Running build in Washington, D.C., USA (East) – iad1
[01:03:00.877] Cloning github.com/heyjumanji/jumanjiblogs (Branch: main, Commit: 8567704)
[01:03:01.672] Previous build cache not available
[01:03:02.262] Cloning completed: 1.385s
[01:03:02.567] Running "vercel build"
[01:03:03.003] Vercel CLI 39.2.0
[01:03:03.387] Installing dependencies...
[01:03:04.196] ➤ YN0000: ┌ Resolution step
[01:03:04.440] ➤ YN0002: │ @algolia/autocomplete-core@npm:1.9.3 doesn't provide @algolia/client-search (pbc410), requested by @algolia/autocomplete-shared
[01:03:04.442] ➤ YN0002: │ @algolia/autocomplete-core@npm:1.9.3 doesn't provide algoliasearch (p8ad5b), requested by @algolia/autocomplete-shared
[01:03:04.443] ➤ YN0002: │ @algolia/autocomplete-core@npm:1.9.3 doesn't provide search-insights (pfdb70), requested by @algolia/autocomplete-plugin-algolia-insights
[01:03:04.443] ➤ YN0002: │ @algolia/autocomplete-plugin-algolia-insights@npm:1.9.3 [e43f4] doesn't provide @algolia/client-search (pdf3b9), requested by @algolia/autocomplete-shared
[01:03:04.443] ➤ YN0002: │ @algolia/autocomplete-plugin-algolia-insights@npm:1.9.3 [e43f4] doesn't provide algoliasearch (p0f6bb), requested by @algolia/autocomplete-shared
[01:03:04.443] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (p22e89) with version 1.8.0, which doesn't satisfy what @opentelemetry/core requests
[01:03:04.444] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (pde20c) with version 1.8.0, which doesn't satisfy what @opentelemetry/resources requests
[01:03:04.444] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (p18e9a) with version 1.8.0, which doesn't satisfy what @opentelemetry/sdk-trace-base requests
[01:03:04.444] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (p31076) with version 1.8.0, which doesn't satisfy what @opentelemetry/exporter-trace-otlp-grpc and some of its descendants request
[01:03:04.444] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/exporter-trace-otlp-grpc (pbedd1) with version 0.48.0, which doesn't satisfy what @effect-ts/otel-exporter-trace-otlp-grpc requests
[01:03:04.444] ➤ YN0002: │ @docsearch/react@npm:3.6.0 [72311] doesn't provide @algolia/client-search (pc7191), requested by @algolia/autocomplete-preset-algolia
[01:03:04.445] ➤ YN0060: │ tailwind-nextjs-starter-blog@workspace:. provides react (p923c3) with version 18.2.0, which doesn't satisfy what pliny and some of its descendants request
[01:03:04.445] ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
[01:03:04.445] ➤ YN0000: └ Completed in 0s 249ms
[01:03:04.506] ➤ YN0000: ┌ Fetch step
[01:04:14.671] ➤ YN0066: │ typescript@patch:typescript@npm%3A5.4.3#~builtin<compat/typescript>::version=5.4.3&hash=14eedb: Cannot apply hunk #2
[01:04:14.725] ➤ YN0013: │ 34 packages were already cached, 1075 had to be fetched
[01:04:14.729] ➤ YN0000: └ Completed in 1m 11s
[01:04:14.780] ➤ YN0000: ┌ Link step
[01:04:28.341] ➤ YN0007: │ esbuild@npm:0.20.2 must be built because it never has been before or the last one failed
[01:04:28.342] ➤ YN0007: │ protobufjs@npm:7.2.6 must be built because it never has been before or the last one failed
[01:04:28.585] ➤ YN0007: │ contentlayer2@npm:0.4.4 must be built because it never has been before or the last one failed
[01:04:30.231] ➤ YN0000: └ Completed in 15s 452ms
[01:04:30.328] ➤ YN0000: Done with warnings in 1m 27s
[01:04:30.533] Detected Next.js version: 14.1.4
[01:04:30.535] Running "next build"
[01:04:31.139] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[01:04:31.139] This information is used to shape Next.js' roadmap and prioritize features.
[01:04:31.139] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[01:04:31.139] https://nextjs.org/telemetry
[01:04:31.139] 
[01:04:31.230]    ▲ Next.js 14.1.4
[01:04:31.231]    - Environments: .env
[01:04:31.231] 
[01:04:31.305]    Creating an optimized production build ...
[01:04:33.125] (node:532) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
[01:04:33.126] (Use `node --trace-deprecation ...` to show where the warning was created)
[01:04:34.639] successCallback /vercel/path0/.contentlayer
[01:04:34.668] SuccessCallbackError {
[01:04:34.668]   error: SyntaxError: Unexpected identifier 'assert'
[01:04:34.668]       at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
[01:04:34.669]       at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
[01:04:34.669]       at ModuleLoader.#translate (node:internal/modules/esm/loader:437:12)
[01:04:34.670]       at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:484:27)
[01:04:34.670]       at ModuleJob._link (node:internal/modules/esm/module_job:115:19),
[01:04:34.673]   _tag: 'SuccessCallbackError',
[01:04:34.673]   toString: [Function (anonymous)],
[01:04:34.673]   [Symbol()]: {
[01:04:34.673]     error: SyntaxError: Unexpected identifier 'assert'
[01:04:34.673]         at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
[01:04:34.673]         at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
[01:04:34.673]         at ModuleLoader.#translate (node:internal/modules/esm/loader:437:12)
[01:04:34.674]         at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:484:27)
[01:04:34.674]         at ModuleJob._link (node:internal/modules/esm/module_job:115:19)
[01:04:34.674]   },
[01:04:34.674]   [Symbol()]: [ 'error' ]
[01:04:34.674] }
[01:04:34.705] Error: Command "next build" exited with 1
[01:04:35.051] 

I found the same issue, here is my solution that works.
Replace this statement in scripts/rss.mjs:

import tagData from '../app/tag-data.json' assert { type: 'json' };

With these statements:

import fs from 'fs'
const tagData = JSON.parse(
  fs.readFileSync(new URL('../app/tag-data.json', import.meta.url), 'utf-8')
)

I think the root cause is the experimental feature in JavaScript that may not be fully supported by certain Node.js environments in Vercel.

I have replaced as you said but i got another error!

The replacement i did here:

import { writeFileSync, mkdirSync } from 'fs'
import path from 'path'
import { slug } from 'github-slugger'
import { escape } from 'pliny/utils/htmlEscaper.js'
import siteMetadata from '../data/siteMetadata.js'
import fs from 'fs'
const tagData = JSON.parse(
  fs.readFileSync(new URL('../app/tag-data.json', import.meta.url), 'utf-8')
)
import { allBlogs } from '../.contentlayer/generated/index.mjs'
import { sortPosts } from 'pliny/utils/contentlayer.js'

const generateRssItem = (config, post) => `
  <item>
    <guid>${config.siteUrl}/blog/${post.slug}</guid>
    <title>${escape(post.title)}</title>
    <link>${config.siteUrl}/blog/${post.slug}</link>
    ${post.summary && `<description>${escape(post.summary)}</description>`}
    <pubDate>${new Date(post.date).toUTCString()}</pubDate>
    <author>${config.email} (${config.author})</author>
    ${post.tags && post.tags.map((t) => `<category>${t}</category>`).join('')}
  </item>
`

const generateRss = (config, posts, page = 'feed.xml') => `
  <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
      <title>${escape(config.title)}</title>
      <link>${config.siteUrl}/blog</link>
      <description>${escape(config.description)}</description>
      <language>${config.language}</language>
      <managingEditor>${config.email} (${config.author})</managingEditor>
      <webMaster>${config.email} (${config.author})</webMaster>
      <lastBuildDate>${new Date(posts[0].date).toUTCString()}</lastBuildDate>
      <atom:link href="${config.siteUrl}/${page}" rel="self" type="application/rss+xml"/>
      ${posts.map((post) => generateRssItem(config, post)).join('')}
    </channel>
  </rss>
`

async function generateRSS(config, allBlogs, page = 'feed.xml') {
  const publishPosts = allBlogs.filter((post) => post.draft !== true)
  // RSS for blog post
  if (publishPosts.length > 0) {
    const rss = generateRss(config, sortPosts(publishPosts))
    writeFileSync(`./public/${page}`, rss)
  }

  if (publishPosts.length > 0) {
    for (const tag of Object.keys(tagData)) {
      const filteredPosts = allBlogs.filter((post) =>
        post.tags.map((t) => slug(t)).includes(tag)
      )
      const rss = generateRss(config, filteredPosts, `tags/${tag}/${page}`)
      const rssPath = path.join('public', 'tags', tag)
      mkdirSync(rssPath, { recursive: true })
      writeFileSync(path.join(rssPath, page), rss)
    }
  }
}

const rss = () => {
  generateRSS(siteMetadata, allBlogs)
  console.log('RSS feed generated...')
}
export default rss

The error i got:

[01:03:00.770] Running build in Washington, D.C., USA (East) – iad1
[01:03:00.877] Cloning github.com/heyjumanji/jumanjiblogs (Branch: main, Commit: 8567704)
[01:03:01.672] Previous build cache not available
[01:03:02.262] Cloning completed: 1.385s
[01:03:02.567] Running "vercel build"
[01:03:03.003] Vercel CLI 39.2.0
[01:03:03.387] Installing dependencies...
[01:03:04.196] ➤ YN0000: ┌ Resolution step
[01:03:04.440] ➤ YN0002: │ @algolia/autocomplete-core@npm:1.9.3 doesn't provide @algolia/client-search (pbc410), requested by @algolia/autocomplete-shared
[01:03:04.442] ➤ YN0002: │ @algolia/autocomplete-core@npm:1.9.3 doesn't provide algoliasearch (p8ad5b), requested by @algolia/autocomplete-shared
[01:03:04.443] ➤ YN0002: │ @algolia/autocomplete-core@npm:1.9.3 doesn't provide search-insights (pfdb70), requested by @algolia/autocomplete-plugin-algolia-insights
[01:03:04.443] ➤ YN0002: │ @algolia/autocomplete-plugin-algolia-insights@npm:1.9.3 [e43f4] doesn't provide @algolia/client-search (pdf3b9), requested by @algolia/autocomplete-shared
[01:03:04.443] ➤ YN0002: │ @algolia/autocomplete-plugin-algolia-insights@npm:1.9.3 [e43f4] doesn't provide algoliasearch (p0f6bb), requested by @algolia/autocomplete-shared
[01:03:04.443] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (p22e89) with version 1.8.0, which doesn't satisfy what @opentelemetry/core requests
[01:03:04.444] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (pde20c) with version 1.8.0, which doesn't satisfy what @opentelemetry/resources requests
[01:03:04.444] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (p18e9a) with version 1.8.0, which doesn't satisfy what @opentelemetry/sdk-trace-base requests
[01:03:04.444] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/api (p31076) with version 1.8.0, which doesn't satisfy what @opentelemetry/exporter-trace-otlp-grpc and some of its descendants request
[01:03:04.444] ➤ YN0060: │ @contentlayer2/utils@npm:0.4.1 [2490a] provides @opentelemetry/exporter-trace-otlp-grpc (pbedd1) with version 0.48.0, which doesn't satisfy what @effect-ts/otel-exporter-trace-otlp-grpc requests
[01:03:04.444] ➤ YN0002: │ @docsearch/react@npm:3.6.0 [72311] doesn't provide @algolia/client-search (pc7191), requested by @algolia/autocomplete-preset-algolia
[01:03:04.445] ➤ YN0060: │ tailwind-nextjs-starter-blog@workspace:. provides react (p923c3) with version 18.2.0, which doesn't satisfy what pliny and some of its descendants request
[01:03:04.445] ➤ YN0000: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code
[01:03:04.445] ➤ YN0000: └ Completed in 0s 249ms
[01:03:04.506] ➤ YN0000: ┌ Fetch step
[01:04:14.671] ➤ YN0066: │ typescript@patch:typescript@npm%3A5.4.3#~builtin<compat/typescript>::version=5.4.3&hash=14eedb: Cannot apply hunk #2
[01:04:14.725] ➤ YN0013: │ 34 packages were already cached, 1075 had to be fetched
[01:04:14.729] ➤ YN0000: └ Completed in 1m 11s
[01:04:14.780] ➤ YN0000: ┌ Link step
[01:04:28.341] ➤ YN0007: │ esbuild@npm:0.20.2 must be built because it never has been before or the last one failed
[01:04:28.342] ➤ YN0007: │ protobufjs@npm:7.2.6 must be built because it never has been before or the last one failed
[01:04:28.585] ➤ YN0007: │ contentlayer2@npm:0.4.4 must be built because it never has been before or the last one failed
[01:04:30.231] ➤ YN0000: └ Completed in 15s 452ms
[01:04:30.328] ➤ YN0000: Done with warnings in 1m 27s
[01:04:30.533] Detected Next.js version: 14.1.4
[01:04:30.535] Running "next build"
[01:04:31.139] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[01:04:31.139] This information is used to shape Next.js' roadmap and prioritize features.
[01:04:31.139] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[01:04:31.139] https://nextjs.org/telemetry
[01:04:31.139] 
[01:04:31.230]    ▲ Next.js 14.1.4
[01:04:31.231]    - Environments: .env
[01:04:31.231] 
[01:04:31.305]    Creating an optimized production build ...
[01:04:33.125] (node:532) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
[01:04:33.126] (Use `node --trace-deprecation ...` to show where the warning was created)
[01:04:34.639] successCallback /vercel/path0/.contentlayer
[01:04:34.668] SuccessCallbackError {
[01:04:34.668]   error: SyntaxError: Unexpected identifier 'assert'
[01:04:34.668]       at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
[01:04:34.669]       at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
[01:04:34.669]       at ModuleLoader.#translate (node:internal/modules/esm/loader:437:12)
[01:04:34.670]       at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:484:27)
[01:04:34.670]       at ModuleJob._link (node:internal/modules/esm/module_job:115:19),
[01:04:34.673]   _tag: 'SuccessCallbackError',
[01:04:34.673]   toString: [Function (anonymous)],
[01:04:34.673]   [Symbol()]: {
[01:04:34.673]     error: SyntaxError: Unexpected identifier 'assert'
[01:04:34.673]         at compileSourceTextModule (node:internal/modules/esm/utils:338:16)
[01:04:34.673]         at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:102:18)
[01:04:34.673]         at ModuleLoader.#translate (node:internal/modules/esm/loader:437:12)
[01:04:34.674]         at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:484:27)
[01:04:34.674]         at ModuleJob._link (node:internal/modules/esm/module_job:115:19)
[01:04:34.674]   },
[01:04:34.674]   [Symbol()]: [ 'error' ]
[01:04:34.674] }
[01:04:34.705] Error: Command "next build" exited with 1
[01:04:35.051] 

I am getting this identical error, haven't been able to find a fix. If I figure anything out I will post back here.

I found a solution that worked for me. On Vercel, go to your project settings for your page and change the Node.js version to 20.X, if that matches the version of node you have. https://vercel.com/docs/functions/runtimes/node-js/node-js-versions

@alexsalce omg you are awesome, thank you so much! it works for me perfectly and the site back to online and working normal.

Changing the node to *20.x in vercel project settings make it fix the deployment issue.