-
-
Notifications
You must be signed in to change notification settings - Fork 817
Open
Labels
Description
What is the problem?
Hi,
I deployed my blitz app on Render.com. When I want to sign in to my app, I have such an error "No native build was found" in logs. On the dev server, everything works fine. Also, I have another error - "ENOENT" (maybe related) - on a dev server and production.
I'm using blitz js, prisma, and postgresql. I'm using the Next.js app router.
Paste all your error logs here:
Error: No native build was found for platform=linux arch=x64 runtime=node abi=127 uv=1 libc=glibc node=22.12.0 webpack=true
loaded from: /opt/render/project/src/.next/server/app/api/rpc/[[...blitz]]
at _.resolve._.path (.next/server/app/api/rpc/[[...blitz]]/route.js:12:11290)
at _ (.next/server/app/api/rpc/[[...blitz]]/route.js:12:9592)
at 71086 (.next/server/app/api/rpc/[[...blitz]]/route.js:12:15698)
at t (.next/server/webpack-runtime.js:1:143)
at 50998 (.next/server/app/api/rpc/[[...blitz]]/route.js:12:11887)
at t (.next/server/webpack-runtime.js:1:143)
at 33029 (.next/server/app/api/rpc/[[...blitz]]/route.js:12:75061)
at t (.next/server/webpack-runtime.js:1:143)
at 39902 (.next/server/app/api/rpc/[[...blitz]]/route.js:12:2147)
at t (.next/server/webpack-runtime.js:1:143)
{
"errno": -2,
"code": "ENOENT",
"syscall": "open",
"path": "/Users/natalia.stelmach/workspaces/repo/next-js-surf-shop/node_modules/next/dist/client/on-recoverable-error.js"
}
Paste all relevant code snippets here:
render.yaml:
services:
- type: web
name: surfapp
env: node
plan: free
buildCommand:
yarn --frozen-lockfile --prod=false &&
blitz prisma generate &&
blitz build &&
blitz prisma migrate deploy
startCommand: blitz start -p ${PORT}
envVars:
- key: NODE_ENV
value: production
- key: DATABASE_URL
fromDatabase:
name: blitzapp-db
property: connectionString
- key: SESSION_SECRET_KEY
generateValue: true
databases:
- name: blitzapp-db
plan: free
package.json:
{
"name": "nextjs-surf-shop",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "blitz dev",
"build": "blitz build",
"start": "blitz start",
"studio": "blitz prisma studio",
"lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx .",
"test": "vitest run --passWithNoTests",
"test:watch": "vitest",
"prepare": "husky install"
},
"prisma": {
"schema": "db/schema.prisma"
},
"prettier": {
"semi": false,
"printWidth": 100
},
"lint-staged": {
"*.{js,ts,tsx}": [
"eslint --fix"
]
},
"dependencies": {
"@blitzjs/auth": "2.2.2",
"@blitzjs/next": "2.2.2",
"@blitzjs/rpc": "2.2.2",
"@eslint-types/prettier": "5.1.3",
"@hookform/resolvers": "^3.9.0",
"@prisma/client": "5.4.2",
"@radix-ui/react-alert-dialog": "^1.1.1",
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-checkbox": "^1.1.1",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "2.1.6",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-navigation-menu": "^1.2.0",
"@radix-ui/react-radio-group": "^1.2.0",
"@radix-ui/react-select": "^2.1.1",
"@radix-ui/react-separator": "^1.1.0",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tabs": "^1.1.0",
"@radix-ui/react-toast": "^1.2.1",
"@tanstack/react-query": "4.0.10",
"@types/react-form": "4.0.6",
"blitz": "2.2.2",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"embla-carousel-react": "^8.2.0",
"lucide-react": "0.424.0",
"next": "15.1.6",
"prisma": "5.4.2",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-hook-form": "7.54.2",
"react-markdown": "^8.0.6",
"remark-gfm": "^4.0.0",
"secure-password": "4.0.0",
"tailwind-merge": "2.6.0",
"tailwindcss-animate": "1.0.7",
"zod": "3.23.8",
"zod-prisma-types": "3.2.3"
},
"devDependencies": {
"@next/env": "13.4.19",
"@tailwindcss/typography": "^0.5.15",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "16.0.1",
"@types/node": "^20",
"@types/preview-email": "2.0.1",
"@types/react": "18.0.25",
"@types/react-dom": "18.3.5",
"@typescript-eslint/eslint-plugin": "5.42.1",
"@vitejs/plugin-react": "2.2.0",
"ajv": "^7.0.0",
"eslint": "8.27.0",
"eslint-config-next": "12.3.1",
"eslint-config-prettier": "8.5.0",
"husky": "8.0.2",
"jsdom": "20.0.3",
"lint-staged": "13.0.3",
"postcss": "^8",
"prettier": "2.8.8",
"prettier-plugin-prisma": "4.4.0",
"pretty-quick": "3.1.3",
"preview-email": "3.0.7",
"tailwindcss": "^3.4.1",
"typescript": "5.7.3",
"vite-tsconfig-paths": "3.6.0",
"vitest": "0.25.3"
}
}
next.config.js:
const { withBlitz } = require("@blitzjs/next")
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
typedRoutes: true,
},
}
module.exports = withBlitz(nextConfig)
src/app/api/rpc/[[...blitz]]/route.ts:
import { rpcAppHandler } from "@blitzjs/rpc"
import { withBlitzAuth } from "@/src/app/blitz-server"
export const { GET, POST, HEAD } = withBlitzAuth(rpcAppHandler())
What are detailed steps to reproduce this?
- https://surfapp-ggrv.onrender.com/
- Try to sign in
- There is an error
- In logs, there is a "No native build was found" error
Run blitz -v and paste the output here:
Blitz version: 2.2.0 (global)
Blitz version: 2.2.2 (local)
macOS Sequoia | darwin-arm64 | Node: v20.18.1
Package manager: npm
System:
OS: macOS 15.3
CPU: (14) arm64 Apple M3 Max
Memory: 18.70 GB / 96.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.18.1 - /opt/homebrew/opt/node@20/bin/node
Yarn: 1.22.22 - /opt/homebrew/bin/yarn
npm: 10.8.2 - /opt/homebrew/opt/node@20/bin/npm
npmPackages:
@blitzjs/auth: 2.2.2 => 2.2.2
@blitzjs/next: 2.2.2 => 2.2.2
@blitzjs/rpc: 2.2.2 => 2.2.2
@prisma/client: 5.4.2 => 5.4.2
blitz: 2.2.2 => 2.2.2
next: 15.1.6 => 15.1.6
prisma: 5.4.2 => 5.4.2
react: 18.3.1 => 18.3.1
react-dom: 18.3.1 => 18.3.1
typescript: 5.7.3 => 5.7.3
Please include below any other applicable logs and screenshots that show your problem:
No response