mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
fix default encryption key file path - Error: Error: Error: ENOENT: no such file or directory, open ''
This commit is contained in:
@@ -355,10 +355,10 @@ export const getEnvironmentVariable = (name: string): string | undefined => {
|
||||
*/
|
||||
const getEncryptionKeyFilePath = (): string => {
|
||||
const checkPaths = [
|
||||
path.join(__dirname, '..', '..', 'server', 'encryption.key'),
|
||||
path.join(__dirname, '..', '..', '..', 'server', 'encryption.key'),
|
||||
path.join(__dirname, '..', '..', '..', '..', 'server', 'encryption.key'),
|
||||
path.join(__dirname, '..', '..', '..', '..', '..', 'server', 'encryption.key')
|
||||
path.join(__dirname, '..', '..', 'encryption.key'),
|
||||
path.join(__dirname, '..', '..', '..', 'encryption.key'),
|
||||
path.join(__dirname, '..', '..', '..', '..', 'encryption.key'),
|
||||
path.join(__dirname, '..', '..', '..', '..', '..', 'encryption.key')
|
||||
]
|
||||
for (const checkPath of checkPaths) {
|
||||
if (fs.existsSync(checkPath)) {
|
||||
|
||||
@@ -44,7 +44,8 @@ import {
|
||||
transformToCredentialEntity,
|
||||
decryptCredentialData,
|
||||
clearSessionMemory,
|
||||
replaceInputsWithConfig
|
||||
replaceInputsWithConfig,
|
||||
getEncryptionKey
|
||||
} from './utils'
|
||||
import { cloneDeep, omit } from 'lodash'
|
||||
import { getDataSource } from './DataSource'
|
||||
@@ -82,6 +83,9 @@ export class App {
|
||||
|
||||
// Initialize API keys
|
||||
await getAPIKeys()
|
||||
|
||||
// Initialize encryption key
|
||||
await getEncryptionKey()
|
||||
})
|
||||
.catch((err) => {
|
||||
logger.error('❌ [server]: Error during Data Source initialization:', err)
|
||||
|
||||
Reference in New Issue
Block a user