Skip to content

Failed to compile with errors when I used pug template #2645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fengxinming opened this issue Sep 29, 2018 · 3 comments
Closed

Failed to compile with errors when I used pug template #2645

fengxinming opened this issue Sep 29, 2018 · 3 comments

Comments

@fengxinming
Copy link

Version

3.0.4

Reproduction link

https://github.com/fengxinming/vuecli3-demo

Node and OS info

node v8.11.1, npm 6.4.1, macOS

Steps to reproduce

npm i
npm run build

What is expected?

Build complete

What is actually happening?

Error: Child compilation failed:
Module build failed (from ./node_modules/_pug-plain-loader@1.0.0@pug-plain-loader/index.js):
TypeError: Cannot read property 'options' of undefined

  • TypeError: Cannot read property 'options' of undefined

  • compiler.js:79 childCompiler.runAsChild
    [vuecli3-demo]/[_html-webpack-plugin@3.2.0@html-webpack-plugin]/lib/compiler.js:79:16

  • Compiler.js:290 compile
    [vuecli3-demo]/[_webpack@4.20.2@webpack]/lib/Compiler.js:290:11

  • Compiler.js:547 hooks.afterCompile.callAsync.err
    [vuecli3-demo]/[_webpack@4.20.2@webpack]/lib/Compiler.js:547:14

  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [vuecli3-demo]/[_tapable@1.1.0@tapable]/lib/Hook.js:154:20

  • Compiler.js:544 compilation.seal.err
    [vuecli3-demo]/[_webpack@4.20.2@webpack]/lib/Compiler.js:544:30

  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [vuecli3-demo]/[_tapable@1.1.0@tapable]/lib/Hook.js:154:20

  • Compilation.js:1296 hooks.optimizeAssets.callAsync.err
    [vuecli3-demo]/[_webpack@4.20.2@webpack]/lib/Compilation.js:1296:35

  • Hook.js:154 AsyncSeriesHook.lazyCompileHook
    [vuecli3-demo]/[_tapable@1.1.0@tapable]/lib/Hook.js:154:20

  • Compilation.js:1287 hooks.optimizeChunkAssets.callAsync.err
    [vuecli3-demo]/[_webpack@4.20.2@webpack]/lib/Compilation.js:1287:32

  • index.js:287
    [vuecli3-demo]/[_uglifyjs-webpack-plugin@1.3.0@uglifyjs-webpack-plugin]/dist/index.js:287:11

  • Runner.js:67 Runner.runTasks
    [vuecli3-demo]/[_uglifyjs-webpack-plugin@1.3.0@uglifyjs-webpack-plugin]/dist/uglify/Runner.js:67:9

  • index.js:198 UglifyJsPlugin.optimizeFn
    [vuecli3-demo]/[_uglifyjs-webpack-plugin@1.3.0@uglifyjs-webpack-plugin]/dist/index.js:198:16

@haoqunjiang
Copy link
Member

template: '!!pug-plain-loader!public/index.pug',

@fengxinming
Copy link
Author

@sodatea this issues was not resolved, because index-default.html was compiled

@haoqunjiang
Copy link
Member

Sorry for providing the false solution.
See the correct config here: #2601 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants