Flowise
Flowise copied to clipboard
[BUG]Error in start
Describe the bug When I start in my Macbook, there is an error. How to avoid this?
To Reproduce Steps to reproduce the behavior:
Download and Install NodeJS >= 18.15.0
Install Flowise
npm install -g flowise Start Flowise
npx flowise start
Expected behavior Start the server
Screenshots Error message in my console:
Starting Flowise...
⚡️[server]: Flowise Server is listening at 3000
❌[server]: Error during Data Source initialization: QueryFailedError: SQLITE_READONLY: attempt to write a readonly database
at Statement.handler (/Users/nick/Flowise/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:81:26)
at Statement.replacement (/Users/nick/Flowise/node_modules/sqlite3/lib/trace.js:25:27)
at Statement.replacement (/Users/nick/Flowise/node_modules/sqlite3/lib/trace.js:25:27) {
query: CREATE TABLE "tool" ("id" varchar PRIMARY KEY NOT NULL, "name" varchar NOT NULL, "description" varchar NOT NULL, "color" varchar NOT NULL, "schema" varchar, "func" varchar, "createdDate" datetime NOT NULL DEFAULT (datetime('now')), "updatedDate" datetime NOT NULL DEFAULT (datetime('now')))
,
parameters: undefined,
driverError: Error: SQLITE_READONLY: attempt to write a readonly database
--> in Statement#all(undefined, [Function: replacement])
at Database.
Setup
-> % node -v
v18.16.1
When I use sudo user to start the server by "sudo npx flowise start"
The error message disappeared:
-> % sudo npx flowise start
Password:
Starting Flowise...
⚡️[server]: Flowise Server is listening at 3000
📦[server]: Data Source has been initialized!
But I can't enter the main screen of Flowise.
try uninstalling and reinstall npm, and reclone
git clone https://github.com/FlowiseAI/Flowise.git
cd Flowise
yarn install
yarn build-force
yarn start
ERROR almost the same: flowise:dev: [1] ❌[server]: Error during Data Source initialization: QueryFailedError: SQLITE_CONSTRAINT: NOT NULL constraint failed: temporary_chat_flow.isPublic flowise:dev: [1] at Statement.handler (/Users/block/code/llm/Flowise/node_modules/typeorm/src/driver/sqlite/SqliteQueryRunner.ts:113:26) { flowise:dev: [1] query: 'INSERT INTO "temporary_chat_flow"("id", "name", "flowData", "apikeyid", "createdDate", "updatedDate") SELECT "id", "name", "flowData", "apikeyid", "createdDate", "updatedDate" FROM "chat_flow"', flowise:dev: [1] parameters: undefined, flowise:dev: [1] driverError: [Error: SQLITE_CONSTRAINT: NOT NULL constraint failed: temporary_chat_flow.isPublic] { flowise:dev: [1] errno: 19, flowise:dev: [1] code: 'SQLITE_CONSTRAINT' flowise:dev: [1] }, flowise:dev: [1] errno: 19, flowise:dev: [1] code: 'SQLITE_CONSTRAINT' flowise:dev: [1] } flowise:dev: [0] flowise:dev: [0] 12:11:27 - Found 0 errors. Watching for file changes.
ERROR almost the same: flowise:dev: [1] ❌[server]: Error during Data Source initialization: QueryFailedError: SQLITE_CONSTRAINT: NOT NULL constraint failed: temporary_chat_flow.isPublic flowise:dev: [1] at Statement.handler (/Users/block/code/llm/Flowise/node_modules/typeorm/src/driver/sqlite/SqliteQueryRunner.ts:113:26) { flowise:dev: [1] query: 'INSERT INTO "temporary_chat_flow"("id", "name", "flowData", "apikeyid", "createdDate", "updatedDate") SELECT "id", "name", "flowData", "apikeyid", "createdDate", "updatedDate" FROM "chat_flow"', flowise:dev: [1] parameters: undefined, flowise:dev: [1] driverError: [Error: SQLITE_CONSTRAINT: NOT NULL constraint failed: temporary_chat_flow.isPublic] { flowise:dev: [1] errno: 19, flowise:dev: [1] code: 'SQLITE_CONSTRAINT' flowise:dev: [1] }, flowise:dev: [1] errno: 19, flowise:dev: [1] code: 'SQLITE_CONSTRAINT' flowise:dev: [1] } flowise:dev: [0] flowise:dev: [0] 12:11:27 - Found 0 errors. Watching for file changes.
the problem solved when configure DATABASE_PATH cat packages/server/.env DEBUG=true DATABASE_PATH=/Users/block/code/data/.flowise