mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 15:22:39 +00:00
better No build files found error
This commit is contained in:
parent
ce5cb62ee6
commit
76c3b358cc
@ -128,7 +128,7 @@ export default class Builder extends Tapable {
|
|||||||
const bundlePath = join(serverConfig.output.path, 'server-bundle.json')
|
const bundlePath = join(serverConfig.output.path, 'server-bundle.json')
|
||||||
const manifestPath = join(serverConfig.output.path, 'client-manifest.json')
|
const manifestPath = join(serverConfig.output.path, 'client-manifest.json')
|
||||||
if (!fs.existsSync(bundlePath) || !fs.existsSync(manifestPath)) {
|
if (!fs.existsSync(bundlePath) || !fs.existsSync(manifestPath)) {
|
||||||
throw new Error('No build files found, please run `nuxt build` before launching `nuxt start`')
|
throw new Error(`No build files found in ${serverConfig.output.path}, please run \`nuxt build\` before launching \`nuxt start\``)
|
||||||
}
|
}
|
||||||
const bundle = fs.readFileSync(bundlePath, 'utf8')
|
const bundle = fs.readFileSync(bundlePath, 'utf8')
|
||||||
const manifest = fs.readFileSync(manifestPath, 'utf8')
|
const manifest = fs.readFileSync(manifestPath, 'utf8')
|
||||||
|
Loading…
Reference in New Issue
Block a user