{"record":{"id":"1ec44122932b9805","repo":"vuejs/vue","slug":"entry-entryname-not-found-did-you-specify-th","errorCode":null,"errorMessage":"Entry \"${entryName}\" not found. Did you specify the correct entry option?","messagePattern":"Entry \"(.+?)\" not found\\. Did you specify the correct entry option\\?","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/server-renderer/src/webpack-plugin/server.ts","lineNumber":39,"sourceCode":"      const entryInfo = stats.entrypoints[entryName]\n\n      if (!entryInfo) {\n        // #5553\n        return cb()\n      }\n\n      const entryAssets = entryInfo.assets.map(getAssetName).filter(isJS)\n\n      if (entryAssets.length > 1) {\n        throw new Error(\n          `Server-side bundle should have one single entry file. ` +\n            `Avoid using CommonsChunkPlugin in the server config.`\n        )\n      }\n\n      const entry = entryAssets[0]\n      if (!entry || typeof entry !== 'string') {\n        throw new Error(\n          `Entry \"${entryName}\" not found. Did you specify the correct entry option?`\n        )\n      }\n\n      const bundle = {\n        entry,\n        files: {},\n        maps: {}\n      }\n\n      Object.keys(compilation.assets).forEach(name => {\n        if (isJS(name)) {\n          bundle.files[name] = compilation.assets[name].source()\n        } else if (name.match(/\\.js\\.map$/)) {\n          bundle.maps[name.replace(/\\.map$/, '')] = JSON.parse(\n            compilation.assets[name].source()\n          )\n        }","sourceCodeStart":21,"sourceCodeEnd":57,"githubUrl":"https://github.com/vuejs/vue/blob/9e88707940088cb1f4cd7dd210c9168a50dc347c/packages/server-renderer/src/webpack-plugin/server.ts#L21-L57","documentation":"Thrown by VueSSRServerPlugin when the entry chunk exists in stats.entrypoints but its assets, after filtering to JS, yield no usable string entry. This means entryAssets[0] is undefined or not a string — the webpack stats reported an entry with no JS asset. Distinct from error 16 (which fires when there are too many JS assets); here there are zero.","triggerScenarios":"Webpack server build emitted only non-JS assets for the entry (e.g. only a .json or .css), or the entry name in stats doesn't match any emitted JS file. Also possible when stats.entrypoints is keyed by an entry whose assets array is empty after the isJS filter.","commonSituations":"Webpack entry config points to a non-JS file or a file that produces no JS output. The entry key name was changed in config but the build references the old name. A webpack 5 stats format change causes assets to be nested differently. The build failed to emit JS due to a loader error that didn't fail the build.","solutions":["Check webpack config entry: it must point to a .js entry file that emits JS output.","Inspect the emitted files in the output directory to confirm a JS entry was produced.","If using webpack 5, ensure the server build actually emits the entry chunk (check for silent loader failures).","Verify entrypoints in stats: log Object.keys(stats.entrypoints) and stats.entrypoints[entryName].assets."],"exampleFix":"// before — entry points to non-JS or missing file\nmodule.exports = {\n  entry: { app: './src/server-style.css' }\n}\n\n// after — entry points to the SSR JS entry\nmodule.exports = {\n  entry: { app: './src/entry-server.js' }\n}","handlingStrategy":"validation","validationCode":"// Before building, verify the entry config.\nfunction assertEntryIsJs(config: any): void {\n  const entries = config.entry\n  const entryValues = typeof entries === 'string' ? [entries] : Object.values(entries)\n  for (const v of entryValues) {\n    const files = Array.isArray(v) ? v : [v]\n    if (!files.some((f: string) => /\\.js$/.test(f))) {\n      throw new Error(`SSR entry must include a .js file; got ${files.join(', ')}`)\n    }\n  }\n}","typeGuard":"function entryResolvesToJs(config: any): boolean {\n  const e = config.entry\n  const flat = typeof e === 'string' ? [e] : Array.isArray(e) ? e : Object.values(e).flatMap(v => Array.isArray(v) ? v : [v])\n  return flat.some((f: string) => /\\.([mc]?js|ts|tsx|jsx)$/.test(f))\n}","tryCatchPattern":"compiler.run((err, stats) => {\n  if (err && err.message.includes('not found. Did you specify the correct entry option')) {\n    console.error('Server entry not emitted. Check webpack entry path and loader chain.')\n  }\n})","preventionTips":["Point the server webpack entry to a .js (or transpiled .ts) file that emits JS.","Confirm the output filename pattern produces a .js for the entry chunk.","Run the SSR build and inspect the dist directory to confirm a JS entry was emitted.","Log Object.keys(stats.toJson().entrypoints) after build to verify entry names."],"tags":["ssr","webpack","entry","bundle","config"],"analyzedSha":"9e88707940088cb1f4cd7dd210c9168a50dc347c","analyzedAt":"2026-08-11T22:22:01.295Z","schemaVersion":2},"datasetVersion":"2026-08-12T04:17:13.124Z"}