npm start 报错:render error TypeError: Cannot read property 'call' of undefined

来源:5-6 生产环境服务端渲染

beckham7

2018-08-07

http://img.mukewang.com/szimg/5b69584b0001f42112140860.jpg

在这里打印的错误

http://img.mukewang.com/szimg/5b6958a800010bec07520630.jpg


以下是包版本信息,webpack 4.0的,之前遇到的问题都解决了,但是服务器渲染折腾我好久了,求各位大神指点

"vue": "^2.5.17",

"vue-meta": "^1.5.2",

"vue-router": "^3.0.1",

"vue-server-renderer": "^2.5.17",

"vuex": "^3.0.1"

"webpack": "^4.16.3",

"webpack-cli": "^3.1.0",

"webpack-dev-server": "^3.1.5",

"webpack-merge": "^4.1.3"


写回答

8回答

慕工程2267832

2020-09-16

同问啊

0
0

qq_我的天空_6

2019-05-24

"dependencies": {

"axios": "^0.17.1",

"ejs": "^2.5.7",

"koa": "^2.4.1",

"koa-body": "^2.5.0",

"koa-router": "^7.4.0",

"koa-send": "^4.1.2",

"koa-session": "^5.8.1",

"sha1": "^1.1.1",

"vue": "2.5.13",

"vue-meta": "^1.4.3",

"vue-router": "^3.0.1",

"vue-server-renderer": "^2.5.13",

"vuex": "^3.0.1"

},

"devDependencies": {

"autoprefixer": "7.2.3",

"babel-core": "6.26.0",

"babel-eslint": "^8.2.1",

"babel-helper-vue-jsx-merge-props": "2.0.3",

"babel-loader": "7.1.2",

"babel-plugin-syntax-dynamic-import": "^6.18.0",

"babel-plugin-syntax-jsx": "6.18.0",

"babel-plugin-transform-vue-jsx": "3.5.0",

"babel-preset-env": "1.6.1",

"babel-preset-stage-1": "^6.24.1",

"concurrently": "^3.5.1",

"cross-env": "5.1.3",

"css-loader": "0.28.7",

"eslint": "^4.16.0",

"eslint-config-standard": "^11.0.0-beta.0",

"eslint-loader": "^1.9.0",

"eslint-plugin-html": "^4.0.1",

"eslint-plugin-import": "^2.8.0",

"eslint-plugin-node": "^5.2.1",

"eslint-plugin-promise": "^3.6.0",

"eslint-plugin-standard": "^3.0.1",

"extract-text-webpack-plugin": "3.0.2",

"file-loader": "1.1.6",

"html-webpack-plugin": "2.30.1",

"husky": "^0.14.3",

"memory-fs": "^0.4.1",

"nodemon": "^1.14.12",

"postcss-loader": "2.0.9",

"qiniu": "^7.1.2",

"rimraf": "^2.6.2",

"style-loader": "0.19.1",

"stylus": "0.54.5",

"stylus-loader": "3.0.1",

"url-loader": "0.6.2",

"vue-loader": "13.6.0",

"vue-style-loader": "^3.0.3",

"vue-template-compiler": "2.5.13",

"webpack": "3.10.0",

"webpack-dev-server": "2.9.7",

"webpack-merge": "^4.1.1"

}


我也遇到了这个问题,这个是老师的代码    估计是配置版本的问题,我用老师这个配置就可以了

0
0

qq_随便先生论芝麻的重要性_03960610

2019-05-22

你解决了吗?我也遇到这个问题,卡了好久,现在还不知道怎么解决

0
0

桂花糕

2019-03-20

找了半小时,终于知道为什么报错了,因为mpvue运行时会生成一个dist文件夹,小程序是通过识别这个文件夹里的代码运行的,假如你开发时删除了pages文件夹里的某个页面(之前路由配置过,但现在路由里没有的),就会报这个错,解决办法就是删除dist文件夹,重新运行npm start自动生成。

0
0

qq_mk3_0

2018-12-18

请问这个问题解决了吗?我也是报一样的错。

0
0

beckham7

提问者

2018-08-20

//img.mukewang.com/szimg/5b7a2be10001575b12800463.jpg


(准确的说是npm start正常 然后访问3333端口报错,如图)

0
1
Lucas_xu
请问下 解决了嘛 这个问题
2018-08-31
共1条回复

beckham7

提问者

2018-08-20

//img.mukewang.com/szimg/5b7a2be10001575b12800463.jpg


(准确的说是npm start正常 然后访问3333端口报错,如图)

0
0

Jokcy

2018-08-09

render部分的代码贴出来

0
1
beckham7
​https://gitee.com/jayitachi/vue-ssr-tech 代码我都放这里了,麻烦了~ 准确的说是npm start正常 然后访问3333端口报错,如最后一张截图
2018-08-20
共1条回复

Vue核心技术 Vue+Vue-Router+Vuex+SSR实战精讲

深入讲解Vue核心技术,展示Vue应用开发中的各种问题和解决方案

3168 学习 · 853 问题

查看课程