Skip to content

Commit 232e04a

Browse files
committed
fix: error "Could not find a valid build"
1 parent bfeb1e0 commit 232e04a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ node_modules
22
node_modules_bak
33
.DS_Store
44
yarn-error.log
5-
lerna-debug.log
5+
lerna-debug.log
6+
packages/example

packages/zenn-cli/cli/preview/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const exec: cliCommand = async (argv) => {
2626
const port = args["--port"] || 8000;
2727
const watch = args["--watch"] ?? true;
2828
const previewUrl = `http://localhost:${port}`;
29-
const srcDir = process.cwd(); // refer project root from dist/cli/zenn-preview.js
29+
const srcDir = `${__dirname}/../../../.`; // refer ".next" dir from dist/cli/preview/index.js
3030
const server = await build({ port, previewUrl, srcDir });
3131
await open(previewUrl);
3232
if (watch) {

0 commit comments

Comments
 (0)