zeit-now

now-cli deployment doesn't build package.json dependencies

巧了我就是萌 提交于 2019-12-22 18:48:14
问题 I'm trying to deploy a Sapper built application via @now-node . The task is basically to deploy a Polka server with dependencies and to serve static/ and client/ files statically. I have managed to include the files that Lambda requires via includeFiles but now I see in the logs that the builder ignores dependencies described in package.json. The exact message is Starting server on port 3000 Cannot find module 'sirv' Did you forget to add it to "dependencies" in `package.json`? But I see in

Use absolute imports in Next.js app deployed with ZEIT Now

徘徊边缘 提交于 2019-12-21 05:50:24
问题 In the Next.js 9 tutorial the suggested way to import shared components is by relative paths, like import Header from '../components/Header'; I want to use absolute imports, like import Header from 'components/Header'; How do I make this work both locally and when I deploy using the Now CLI? Using the suggested setup from the tutorial, my project structure is: my-project ├── components ├── pages └── package.json 回答1: There are different ways of achieving this, but one way – that requires no

Nest.js deployment to now.sh

馋奶兔 提交于 2019-12-12 12:07:08
问题 I am currently trying to deploy my demo application to zeit now.sh. In documentation I have found how I can deploy Node.js and Express.js application. But example that I am referring expects as parameter js file with server initialization, and by default Nest.js project has as entry point ts file. Whole application is written in typescript. If I try to use main.ts as entry point, I am getting this error: 11/28 08:05 PM (1m) { Error: Cannot find module './app.module' at Function.Module.

How to deploy Next.js with GraphQL backend on Zeit Now?

牧云@^-^@ 提交于 2019-12-11 11:47:03
问题 I have an Next.js/Express/Apollo GraphQL app running fine on localhost. I try to deploy it on Zeit Now, and the Next.js part works fine, but the GraphQL backend fails because /graphql route returns: 502: An error occurred with your deployment Code: NO_STATUS_CODE_FROM_LAMBDA My now.json looks like: { "version": 2, "builds": [ { "src": "next.config.js", "use": "@now/next" }, { "src": "server/server.js", "use": "@now/node" } ], "routes": [ { "src": "/api/(.*)", "dest": "server/server.js" }, {

now-cli deployment doesn't build package.json dependencies

自闭症网瘾萝莉.ら 提交于 2019-12-06 09:44:28
I'm trying to deploy a Sapper built application via @now-node . The task is basically to deploy a Polka server with dependencies and to serve static/ and client/ files statically. I have managed to include the files that Lambda requires via includeFiles but now I see in the logs that the builder ignores dependencies described in package.json. The exact message is Starting server on port 3000 Cannot find module 'sirv' Did you forget to add it to "dependencies" in `package.json`? But I see in the build log that dependencies are not collected. Both package.json and package-lock.json are present