前端项目打包报错
执行 npm run generate
TypeError: Cannot read property 'username' of null  at a.head (pages/user.js:164:31)
TypeError: Cannot read property 'title' of undefined at a.render (pages/article/detail.vue?16bc:1:0)
排除上述错误后 继续执行 npm run generate 报错如下
ERROR in ./pages/article/detail.vue?vue&type=template&id=0acc40bc&scoped=true& (./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_mod
ules/@nuxt/components/dist/loader.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/article/detail.vue?vue&type=template&id=0acc40bc&scoped=true&
)
Module build failed (from ./node_modules/vue-loader/lib/loaders/templateLoader.js):
SyntaxError: Unexpected token (1:169)
    at Parser.pp$4.raise (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:2757:13)
    at Parser.pp.unexpected (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:647:8)
    at Parser.pp$3.parseExprAtom (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:2196:10)
    at Parser.<anonymous> (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:6003:24)
    at Parser.parseExprAtom (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:6129:31)
    at Parser.pp$3.parseExprSubscripts (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:2047:19)
    at Parser.pp$3.parseMaybeUnary (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:2024:17)
    at Parser.pp$3.parseExprOps (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:1966:19)
    at Parser.pp$3.parseMaybeConditional (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:1949:19)
    at Parser.pp$3.parseMaybeAssign (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:1925:19)
    at Parser.pp$3.parseMaybeConditional (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:1954:28)
    at Parser.pp$3.parseMaybeAssign (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:1925:19)
    at Parser.pp$3.parseExprList (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:2663:20)
    at Parser.pp$3.parseSubscripts (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:2075:29)
    at Parser.pp$3.parseExprSubscripts (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:2050:21)
    at Parser.pp$3.parseMaybeUnary (E:\web\my_git\my-blog\frontend-boblog\node_modules\vue-template-es2015-compiler\buble.js:2024:17)
 @ ./pages/article/detail.vue?vue&type=template&id=0acc40bc&scoped=true& 1:0-277 1:0-277
 @ ./pages/article/detail.vue
 @ ./.nuxt/router.js
 @ ./.nuxt/index.js
 @ ./.nuxt/client.js
 @ multi ./node_modules/@nuxt/components/lib/installComponents.js ./.nuxt/client.js

 FATAL  Nuxt build error 