Comments (10)
Execute make switch-db-mode
command, how is it selected?
from teable.
So here's how it goes when I follow the instructions exactly:
-
cd teable && corepack enable && pnpm install
seems to work fine -
pnpm g:build
> @teable/teable@ g:build /home/kaspar/projects/teable
> pnpm -r run build
Scope: 10 of 11 workspace projects
packages/icons build$ tsc
└─ Done in 1.7s
packages/db-main-prisma build$ tsc
│ src/prisma-manager.ts(5,15): error TS2305: Module '"@prisma/client"' has no exported membe…
│ src/prisma.service.ts(3,10): error TS2305: Module '"@prisma/client"' has no exported membe…
│ src/prisma.service.ts(4,15): error TS2305: Module '"@prisma/client"' has no exported membe…
│ src/prisma.service.ts(102,51): error TS7006: Parameter 'prisma' implicitly has an 'any' ty…
│ src/prisma.service.ts(131,16): error TS2339: Property '$connect' does not exist on type 'P…
│ src/prisma.service.ts(135,10): error TS2339: Property '$on' does not exist on type 'Prisma…
│ src/prisma.service.ts(135,30): error TS7006: Parameter 'e' implicitly has an 'any' type.
│ src/seeds/e2e/space-seeds.ts(2,15): error TS2305: Module '"../../"' has no exported member…
│ src/seeds/e2e/space-seeds.ts(55,43): error TS7006: Parameter 'tx' implicitly has an 'any' …
│ src/seeds/e2e/user-seeds.ts(3,15): error TS2305: Module '"../../"' has no exported member …
│ src/seeds/seed.abstract.ts(1,15): error TS2305: Module '"@prisma/client"' has no exported …
└─ Failed in 1.6s at /home/kaspar/projects/teable/packages/db-main-prisma
packages/core build$ tsc
└─ Running...
packages/ui-lib build$ cross-env NODE_ENV=production tsc --build tsconfig.build.json
└─ Running...
/home/kaspar/projects/teable/packages/db-main-prisma:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @teable/[email protected] build: `tsc`
Exit status 2
ELIFECYCLE Command failed with exit code 1.
make switch-db-mode
Select a database to start.
1)sqlite Lightweight embedded, ideal for mobile and embedded systems, simple, resource-efficient, easy integration (default database)
2)postges(pg) Powerful and scalable, suitable for complex enterprise needs, highly customizable, rich community support
Enter a command: 1
make[1]: Entering directory '/home/kaspar/projects/teable'
sed: can't read s~^PRISMA_DATABASE_URL=.*~PRISMA_DATABASE_URL=file:../../db/main.db~: No such file or directory
sed: can't read s~^PRISMA_DATABASE_URL=.*~PRISMA_DATABASE_URL=file:../../db/main.db~: No such file or directory
make[1]: *** [Makefile:283: switch.prisma.env] Error 2
make[1]: Leaving directory '/home/kaspar/projects/teable'
make[1]: Entering directory '/home/kaspar/projects/teable'
> @teable/[email protected] prisma-generate /home/kaspar/projects/teable/packages/db-main-prisma
> prisma generate "--schema" "./prisma/sqlite/schema.prisma"
Prisma schema loaded from prisma/sqlite/schema.prisma
✔ Generated Prisma Client (v5.11.0) to ./../../node_modules/.pnpm/@[email protected][email protected]/node_modules/@prisma/client in 167ms
Start using Prisma Client in Node.js (See: https://pris.ly/d/client)
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate)
import { PrismaClient } from '@prisma/client/edge'
const prisma = new PrismaClient()
See other ways of importing Prisma Client: http://pris.ly/d/importing-client
┌─────────────────────────────────────────────────────────────┐
│ Deploying your app to serverless or edge functions? │
│ Try Prisma Accelerate for connection pooling and caching. │
│ https://pris.ly/cli/accelerate │
└─────────────────────────────────────────────────────────────┘
> @teable/[email protected] prisma-migrate /home/kaspar/projects/teable/packages/db-main-prisma
> dotenv-flow -p ../../apps/nextjs-app -- pnpm prisma migrate "deploy" "--schema" "./prisma/sqlite/schema.prisma"
Prisma schema loaded from prisma/sqlite/schema.prisma
Datasource "db": SQLite database
Error: Prisma schema validation - (get-config wasm)
Error code: P1012
error: Error validating datasource `db`: the URL must start with the protocol `file:`.
--> schema.prisma:9
|
8 | provider = "sqlite"
9 | url = env("PRISMA_DATABASE_URL")
|
Validation Error Count: 1
[Context: getConfig]
Prisma CLI Version : 5.11.0
ELIFECYCLE Command failed with exit code 1.
make[1]: *** [Makefile:269: sqlite.mode] Error 1
make[1]: Leaving directory '/home/kaspar/projects/teable'
make: *** [Makefile:294: switch-db-mode] Error 2
from teable.
Are all these actions performed in the teable project root directory?
from teable.
That's right (except the cd teable
of course). Should say: this is a fresh clone of develop
branch too.
from teable.
Can I see the value configured for the PRISMA_DATABASE_URL
option in your .env.development
file?
from teable.
$ grep PRISMA apps/nextjs-app/.env.development
PRISMA_DATABASE_URL=postgresql://teable:[email protected]:5432/teable?schema=public&statement_cache_size=1
from teable.
$ grep PRISMA apps/nextjs-app/.env.development PRISMA_DATABASE_URL=postgresql://teable:[email protected]:5432/teable?schema=public&statement_cache_size=1
It seems that after running make switch-db-mode
and selecting SQLite, the contents of the configuration file weren't automatically replaced.
Let's try manually modifying PRISMA_DATABASE_URL=file:../../db/main.db
, and then run make switch-db-mode
again and choose option 1.
Lastly, may I ask which operating system you are using?
from teable.
I'm pretty sure that has made it work. After running that pnpm g:build
completes too.
It seems that after running make switch-db-mode and selecting SQLite, the contents of the configuration file weren't automatically replaced.
Yep, you can see it in the log posted above:
make[1]: Entering directory '/home/kaspar/projects/teable'
sed: can't read s~^PRISMA_DATABASE_URL=.*~PRISMA_DATABASE_URL=file:../../db/main.db~: No such file or directory
sed: can't read s~^PRISMA_DATABASE_URL=.*~PRISMA_DATABASE_URL=file:../../db/main.db~: No such file or directory
make[1]: *** [Makefile:283: switch.prisma.env] Error 2
make[1]: Leaving directory '/home/kaspar/projects/teable'
make[1]: Entering directory '/home/kaspar/projects/teable'
I'm on Manjaro Linux. Maybe we are running into some sed
incompatibility?
$ sed --version
sed (GNU sed) 4.9
from teable.
Let's try the latest code from the branch (develop);
I've used perl
to replace sed
. I hope this is helpful and look forward to your reply. Thank you.
from teable.
Seems good! Thanks!
from teable.
Related Issues (20)
- Document docker compose with SQLite HOT 1
- [FR] Is there any plan to support any installation package? HOT 2
- In version 1.20, I am having trouble connecting to my local pg (PostgreSQL) database,
- Some API endpoints returning 403 error code even with all scopes enabled HOT 1
- WebSocket is closed before the connection is established. HOT 1
- [FR] Is there any plan to support K8 deployment? HOT 3
- Let's Make Teable Even Cooler: GCP Deployment Feature Request 🚀 HOT 1
- I hope to have a MacOS app
- API Implementation HOT 1
- Unable to get filtered results when filter is applied on a field where users looked up from another table. HOT 2
- Unable to import linked records when importing excel/csv HOT 1
- [Feature Request] Duplicate Views HOT 1
- [Feature Request] Duplicate Rows HOT 1
- During excel import columns are matched in sequence instead of matching based on column names HOT 1
- [Feature Request] Last Updated By field HOT 1
- License under a more permissive license?
- "You don't have permission to access the database" when trying to get DB connection info HOT 3
- Formula column rendering issue HOT 2
- when export csv if table name contains china charactor ,it will fail HOT 2
- Database support Starrocks
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teable.