Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

216
Views
Next js Custom Directory with Vercel

i want to ask about how to deploy next js with vercel.

Here I have the next js structure which I have changed.

  • frontend (Next js Current Directory)
  • node_modules
  • next.config.js
  • jsconfig.json
  • package-lock.json
  • package.json

Script in package.json.

"scripts": {
    "dev": "next frontend dev",
    "build": "next build frontend",
    "start": "next start frontend",
    "lint": "next lint frontend"
},

Script in next.config.js.

const path = require('path')

const alias = {
  '@/components': path.join(__dirname, 'frontend', 'components'),
  '@/containers': path.join(__dirname, 'frontend', 'containers'),
  '@/styles': path.join(__dirname, 'frontend', 'scss')
}

module.exports = {
  reactStrictMode: true,
  sassOptions: {
    includePaths: [path.join(__dirname, 'frontend/scss')]
  },
  images: {
    domains: ['source.unsplash.com'],
    loader: 'imgix', // this is a hack until the bug is fixed
    path: 'https://noop/'
  },
  webpack: (config) => {
    config.resolve.alias = Object.assign(
      {},
      config.resolve.alias,
      alias
    )

    return config
  }
}

When I import to vercel and deploy only the builds are successful, Then follow with this message:

Error: The file "/vercel/path1/.next/routes-manifest.json" couldn't be found. This is normally caused by a misconfiguration in your project.

Do I have to adjust the build output? or is there a better way.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

check if you run yarn remove next before deployement resolve the problem

about 4 years ago · Juan Pablo Isaza Report

0

I solved it with override OUTPUT DIRECTORY in vercel use frontend/.next. Hope this helps others.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!