Skip to content

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

@fengxinming

Description

@fengxinming

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions