-
Notifications
You must be signed in to change notification settings - Fork 459
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
前端项目打包报错 #155
Comments
node 项目不要打包哦,直接 npm run dev 启动,部署使用 pm2 ,里面的 admin-blog 和 frontend-blog 项目才需要npm run build 部署 |
执行 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. (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
The text was updated successfully, but these errors were encountered: