Flowise icon indicating copy to clipboard operation
Flowise copied to clipboard

[BUG]Error in start

Open qiansheng2 opened this issue 1 year ago • 4 comments

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. (/Users/nick/Flowise/node_modules/sqlite3/lib/sqlite3.js:88:19) at Database. (/Users/nick/Flowise/node_modules/sqlite3/lib/sqlite3.js:20:19) at execute (/Users/nick/Flowise/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:62:46) at /Users/nick/Flowise/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js:103:19 { errno: 8, code: 'SQLITE_READONLY', __augmented: true }, errno: 8, code: 'SQLITE_READONLY', __augmented: true

Setup -> % node -v
v18.16.1

qiansheng2 avatar Jun 24 '23 14:06 qiansheng2

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. image

qiansheng2 avatar Jun 24 '23 14:06 qiansheng2

try uninstalling and reinstall npm, and reclone

git clone https://github.com/FlowiseAI/Flowise.git
cd Flowise
yarn install
yarn build-force
yarn start

HenryHengZJ avatar Jun 25 '23 14:06 HenryHengZJ

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.

luoweb avatar Jul 02 '23 04:07 luoweb

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

luoweb avatar Jul 02 '23 07:07 luoweb