compile error when titleTemplate is a function

shalldie
0
shalldie
commented 8 months ago

Version

vue-cli

Reproduction link

https://github.com/shalldie/nuxt-koa-tpl-err

Steps to reproduce

  1. npm install

  2. npm run dev

What is expected ?

compile successfully and the title is ok.

What is actually happening?

compile error when titleTemplagte is a function

Additional comments?

after vue init nuxt-community/koa-template demo and npm intall

in nuxt.config.js, i add this:

  head: {
    title: '',
    titleTemplate: titleChunk => {
      // If undefined or blank then we don't need the hyphen
      return titleChunk ? `${titleChunk} - wqnmlgbd >_<#@!` : 'wqnmlgbd >_<#@!';
    },
  ...

when i try npm run dev, an error appears:

err.png

bug
0
shalldie
0
shalldie
commented 8 months ago

I found that , update the backpack-core to 0.7.0 can resolve this problem.

0
yccy0524
0
yccy0524
commented 3 months ago

after npm install, nuxt can not find main.js. why? how to handle this problem?

0
yccy0524
0
yccy0524
commented 3 months ago

_20190107211930

0
hdtopku
0
hdtopku
commented 2 months ago

after npm install, nuxt can not find main.js. why? how to handle this problem?
我也遇到了找不到build/main.js,请问你是如何解决的?

0
shalldie
0
shalldie
commented 2 months ago

@yccy0524 @hdtopku
package.json 中的 scripts 方法,devbuild 可能需要修改,server端跟client是分开编译的。

0
hupoo
0
hupoo
commented 2 months ago

@yccy0524 @hdtopku
package.json 中的 scripts 方法,devbuild 可能需要修改,server端跟client是分开编译的。

你解决了这个问题了吗

0
hi-craft
0
hi-craft
commented 2 months ago

如果提示Cannot find module 'path/build/main.js'
是由于nuxt版本过高,降至1.4.2就可以正常编译

0
hupoo
0
hupoo
commented 2 months ago

如果提示Cannot find module 'path/build/main.js'
是由于nuxt版本过高,降至1.4.2就可以正常编译

可以的 感谢

0
KaierChou
0
KaierChou
commented 2 months ago

如果提示Cannot find module 'path/build/main.js'

不需要nuxt降级也是可以的.
backpack-core 升级到最新版本( 0.8.3)

eslint(3.19.0) 和 eslint-loader (2.1.1)也需要升级. 不然编译同样会报错

Make sure 'backpack-core' 、'eslint' and 'eslint-loader' are all latest version

0
Nodreame
0
Nodreame
commented a month ago

如果提示Cannot find module 'path/build/main.js'

不需要nuxt降级也是可以的.
backpack-core 升级到最新版本( 0.8.3)
eslint(3.19.0) 和 eslint-loader (2.1.1)也需要升级. 不然编译同样会报错

Thanks!

0
zhelingwang
0
zhelingwang
commented 18 days ago

如果提示Cannot find module 'path/build/main.js'

不需要nuxt降级也是可以的.

backpack-core 升级到最新版本( 0.8.3)
eslint(3.19.0) 和 eslint-loader (2.1.1)也需要升级. 不然编译同样会报错
Make sure 'backpack-core' 、'eslint' and 'eslint-loader' are all latest version

thanks a lot

0
Informations
Bug ReportOpen
#c28 - Created 8 months ago