Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No native build was found for platform=linux arch=x64 runtime=node abi=108 uv=1 libc=glibc node=18.19.0 webpack=true #4374

Closed
MartinMuzatko opened this issue Sep 11, 2024 · 4 comments
Labels

Comments

@MartinMuzatko
Copy link

MartinMuzatko commented Sep 11, 2024

What is the problem?

When I build and start a fresh project and then click on signup or login, I get the following error.
I suppose the prisma client is meant with this message?

Paste all your error logs here:

{"0":"getCurrentUser()","1":"Finished: resolver:3ms serializer:0ms total:3ms","_meta":{"runtime":"Nodejs","runtimeVersion":"v18.19.0","hostname":"MisanDesktop","name":"blitz-invoke","date":"2024-09-11T18:55:01.131Z","logLevelId":3,"logLevelName":"INFO","path":{"fullFilePath":"/home/misan/dev/gitlab/ssf-blitz3/.next/server/chunks/204.js:116:77116","fileName":"204.js","fileNameWithLine":"204.js:116","fileColumn":"77116","fileLine":"116","filePath":"/.next/server/chunks/204.js","filePathWithLine":"/.next/server/chunks/204.js:116","method":"v.postResponse"}}}
 ⨯ Error: No native build was found for platform=linux arch=x64 runtime=node abi=108 uv=1 libc=glibc node=18.19.0 webpack=true
    loaded from: /home/misan/dev/gitlab/ssf-blitz3/.next/server/app/api/rpc/[[...blitz]]

    at _.resolve._.path (/home/misan/dev/gitlab/ssf-blitz3/.next/server/app/api/rpc/[[...blitz]]/route.js:1:10162)
    at _ (/home/misan/dev/gitlab/ssf-blitz3/.next/server/app/api/rpc/[[...blitz]]/route.js:1:8464)
    at 10723 (/home/misan/dev/gitlab/ssf-blitz3/.next/server/app/api/rpc/[[...blitz]]/route.js:1:14570)
    at t (/home/misan/dev/gitlab/ssf-blitz3/.next/server/webpack-runtime.js:1:143)
    at 59909 (/home/misan/dev/gitlab/ssf-blitz3/.next/server/app/api/rpc/[[...blitz]]/route.js:1:10759)
    at t (/home/misan/dev/gitlab/ssf-blitz3/.next/server/webpack-runtime.js:1:143)
    at 14604 (/home/misan/dev/gitlab/ssf-blitz3/.next/server/app/api/rpc/[[...blitz]]/route.js:1:68617)
    at t (/home/misan/dev/gitlab/ssf-blitz3/.next/server/webpack-runtime.js:1:143)
    at 82640 (/home/misan/dev/gitlab/ssf-blitz3/.next/server/app/api/rpc/[[...blitz]]/route.js:1:6697)
    at t (/home/misan/dev/gitlab/ssf-blitz3/.next/server/webpack-runtime.js:1:143)

Paste all relevant code snippets here:

not relevant

What are detailed steps to reproduce this?

1.blitz new example-project
2. cd example-project
3. npm run build
4. npm run start
5. click on login and attempt to login with any credentials

Run blitz -v and paste the output here:

Blitz version: 2.1.1 (global)
Blitz version: 2.1.1 (local)
Linux 5.15 | linux-x64 | Node: v18.19.0


 Package manager: npm

  System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (4) x64 AMD Ryzen 7 3800X 8-Core Processor
    Memory: 4.97 GB / 5.79 GB
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node
    Yarn: 1.22.4 - /mnt/c/Users/marti/AppData/Roaming/npm/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm
  npmPackages:
    @blitzjs/auth: 2.1.1 => 2.1.1
    @blitzjs/next: 2.1.1 => 2.1.1
    @blitzjs/rpc: 2.1.1 => 2.1.1
    @prisma/client: 5.4.2 => 5.4.2
    blitz: 2.1.1 => 2.1.1
    next: 14.1.4 => 14.1.4
    prisma: 5.4.2 => 5.4.2
    react: 18.2.0 => 18.2.0
    react-dom: 18.2.0 => 18.2.0
    typescript: ^4.8.4 => 4.9.5

Please include below any other applicable logs and screenshots that show your problem:

image

@MartinMuzatko MartinMuzatko added kind/bug Something isn't working status/triage labels Sep 11, 2024
@MykhailoShavlovskyi
Copy link

MykhailoShavlovskyi commented Sep 19, 2024

Happens for me on my mac machine and on a project on AWS deployed via flightcontrol. I am using latest version of blitz.
Does not occur in v2.0.10, only in v2.1.1

@micha2it
Copy link

A workaround is to delete app/api/rpc/[[...blitz]]/route.ts. And create a pages/api/rpc/[[...blitz]].ts:

import { rpcHandler } from "@blitzjs/rpc"
import { api } from "src/app/blitz-server"

export default api(rpcHandler({ onError: (error, ctx) => console.log(error) }))

@cbovard
Copy link

cbovard commented Sep 22, 2024

import { rpcHandler } from "@blitzjs/rpc"
import { api } from "src/app/blitz-server"

export default api(rpcHandler({ onError: (error, ctx) => console.log(error) }))

I have tested this on a new Blitz app and it worked.
I did a blitz build then a blitz start. Tested login, logout and new account.
I also tested running blitz dev and it worked also.

Just have to move a few files around to get it working. Ideally be great if we did not have to do this but. It works.
If there is a way I can help let me know.

@gengjiawen
Copy link
Contributor

duplicate of #4354

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants