diff --git a/lib/utils/util.js b/lib/utils/util.js index a6decead..f1a41223 100644 --- a/lib/utils/util.js +++ b/lib/utils/util.js @@ -216,7 +216,7 @@ const Util = { readFile: async (filePath) => { if (fs.existsSync(filePath)) { const buf = await readFile(filePath).catch((e) => { - Util.logError(e.message || e); + Util.logError(`read file: ${filePath} ${e.message || e}`); }); if (Buffer.isBuffer(buf)) { return buf.toString('utf8'); @@ -247,7 +247,7 @@ const Util = { } } await writeFile(filePath, content).catch((e) => { - Util.logError(e.message || e); + Util.logError(`write file: ${filePath} ${e.message || e}`); }); }, diff --git a/lib/v8/v8.js b/lib/v8/v8.js index 9a1ae438..a2a73f4f 100644 --- a/lib/v8/v8.js +++ b/lib/v8/v8.js @@ -175,11 +175,11 @@ const saveV8HtmlReport = async (reportData, _options) => { // deps const jsFiles = ['monocart-code-viewer', 'monocart-formatter', 'turbogrid'].map((it) => { - return path.resolve(__dirname, `../../node_modules/${it}/dist/${it}.js`); + return path.resolve(`node_modules/${it}/dist/${it}.js`); }); // package v8 ui - jsFiles.push(path.resolve(__dirname, '../packages/monocart-coverage-v8.js')); + jsFiles.push(path.resolve('lib/packages/monocart-coverage-v8.js')); // console.log(jsFiles);