GithubHelp home page GithubHelp logo

Deployment to Now v2 about nextjs-starter HOT 2 OPEN

ekkis avatar ekkis commented on June 12, 2024
Deployment to Now v2

from nextjs-starter.

Comments (2)

ekkis avatar ekkis commented on June 12, 2024

as described in the above link, I've added target: 'serverless' to the next.config.js and "now-build": "next build" to the package.json. also ran yarn add next@canary as described here: https://github.com/zeit/now-builders/issues/155 which changed the 'latest' version with a real version in the dependence list

finally, added back a now.json:

{
  "alias": ["mwg.ekkis.now.sh"],
  "name": "mwg",
  "version": 2,
  "builds": [{ "src": "next.config.js", "use": "@now/next" }]
}

but it just refuses to deploy

one more thing, I changed the "now-build" script in package.json to next build && next export -o dist and now.json now uses "builds": [{ "src": "package.json", "use": "@now/static-build" }] but to no avail

this is utterly hopeless. I've now burnt a couple of hours and I can't even install

from nextjs-starter.

SpainTrain avatar SpainTrain commented on June 12, 2024

I was experiencing a similar issue and adding

target: 'experimental-serverless-trace',

to next.config.js.

Note that builds is a deprecated config key in the latest version of now. The project that I had this issue with sets the build info in Project Settings via the zeit web UI, which I think is the direction Zeit is headed with this kind of config to support monorepo and other use cases. As another troubleshooting step you may try that out (and double check that now CLI is on the latest version). Hope that helps and good luck!

from nextjs-starter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.