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

Cannot use "classic-level" lib as databaseAdapter. TinaCMS not resolving node-gyp-build files #4492

Open
3 tasks done
alexcupertme opened this issue Apr 16, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@alexcupertme
Copy link

Describe the issue that you're seeing. Any Loom videos or screenshots usually help a lot!

Versions: https://pastebin.com/skUyH6x2

Framework: NextJS 13.5.4 , app & pages router

database.ts file: https://pastebin.com/7aBSWACr

Problem i'm struggling with:

When running tinacms build --datalayer-port 8000 && next build i recieve

> tinacms build --datalayer-port 8000 && next build

Starting Tina build
Error: No native build was found for platform=linux arch=x64 runtime=node abi=108 uv=1 libc=glibc node=18.19.1
    loaded from: /tmp/1713199946233

    at load.resolve.load.path (/tmp/1713199946233/database.build.js:54106:13)
    at load (/tmp/1713199946233/database.build.js:54069:34)
    at node_modules/.pnpm/classic-level@1.4.1/node_modules/classic-level/binding.js (/tmp/1713199946233/database.build.js:54257:48)
    at __require (/tmp/1713199946233/database.build.js:9:50)
    at node_modules/.pnpm/classic-level@1.4.1/node_modules/classic-level/index.js (/tmp/1713199946233/database.build.js:54390:19)
    at __require (/tmp/1713199946233/database.build.js:9:50)
    at Object.<anonymous> (/tmp/1713199946233/database.build.js:109507:36)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)

So i debugged these build files, and find out that TinaCMS build creates external directory at /tmp + Date.now(), so node-gyp-build cannot reach native build files.

To reproduce you can use default tina cloud starter with Tina Self hosted setup and use classic-level as database adapter

Reproduction

https://github.com/alexcupertme/tina-classic-level-bug

Steps to reproduce

  1. Clone reproduction repo (i omitted some parts of my configuration but it doesnt affect bug)
  2. npm install
  3. npm run build

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 6800HS Creator Edition
    Memory: 3.61 GB / 13.50 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.19.1 - ~/.nvm/versions/node/v18.19.1/bin/node
    Yarn: 1.22.19 - ~/skyfort/codebase/research/tina-classic-level-bug/node_modules/.bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v18.19.1/bin/npm
    pnpm: 8.11.0 - /usr/bin/pnpm
  npmPackages:
    @tinacms/cli: ^1.5.34 => 1.5.34 
    tinacms: ^1.5.24 => 1.5.24

Validations

@alexcupertme alexcupertme added the bug Something isn't working label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant