TypeError: Cannot call method ‘replace’ of undefined at Filter.trim (/home/www/nodeclub/node_modules/validator/lib/filter.js:60:26) at exports.setting (/home/www/nodeclub/controllers/user.js:120:75) at callbacks (/home/www/nodeclub/node_modules/express/lib/router/index.js:272:11) at param (/home/www/nodeclub/node_modules/express/lib/router/index.js:246:11) at pass (/home/www/nodeclub/node_modules/express/lib/router/index.js:253:5) at Router._dispatch (/home/www/nodeclub/node_modules/express/lib/router/index.js:280:5) at Object.Router.middleware [as handle] (/home/www/nodeclub/node_modules/express/lib/router/index.js:45:10) at next (/home/www/nodeclub/node_modules/express/node_modules/connect/lib/http.js:204:15) at Object.handle (/home/www/nodeclub/plugins/wordpress_redirect/index.js:24:14) at next (/home/www/nodeclub/node_modules/express/node_modules/connect/lib/http.js:204:15)
错误信息很明显了,没有replace方法,在nodeclub/controllers/user.js的120行
不是框架的问题,是你并没有传入相应的字符串进去,好好检查下 出错第一时间是找自己的原因,而不是框架的原因,既然是稳定版,那么最常见的bug一般都会修复的