From 2d5b70b3f78e5346b9e1c83b85b3d2ee0cb6f628 Mon Sep 17 00:00:00 2001 From: chenos Date: Tue, 6 Feb 2024 10:40:08 +0800 Subject: [PATCH] fix: cannot find module 'pg' --- packages/core/cli/src/commands/p-test.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/core/cli/src/commands/p-test.js b/packages/core/cli/src/commands/p-test.js index ce1b8a36d..db9c20d7e 100644 --- a/packages/core/cli/src/commands/p-test.js +++ b/packages/core/cli/src/commands/p-test.js @@ -3,7 +3,6 @@ const { resolve } = require('path'); const pAll = require('p-all'); const dotenv = require('dotenv'); const fs = require('fs'); -const { Client } = require('pg'); const glob = require('glob'); const _ = require('lodash'); @@ -22,7 +21,7 @@ const config = { async function runApp(dir, index = 0) { // 一个进程需要占用两个端口? (一个是应用端口,一个是 socket 端口) index = index * 2; - + const { Client } = require('pg'); const database = `nocobase${index}`; const client = new Client({ host: config['DB_HOST'],