我正在执行以下步骤: http://keystonejs.com/getting-started/
nodejs - v0.12.7
mongod - db version v3.2.0
但我收到错误
} if (userModelPath.includes('-')) { ;
^
TypeError: undefined is not a function
at eval (eval at template (/usr/local/lib/node_modules/generator-keystone/node_modules/yeoman-generator/node_modules/lodash/dist/lodash.js:6306:22), <anonymous>:77:22)
at KeystoneGenerator.underscore [as _engine] (/usr/local/lib/node_modules/generator-keystone/node_modules/yeoman-generator/lib/util/engines.js:31:45)
at KeystoneGenerator.engine (/usr/local/lib/node_modules/generator-keystone/node_modules/yeoman-generator/lib/actions/actions.js:314:10)
at KeystoneGenerator.template (/usr/local/lib/node_modules/generator-keystone/node_modules/yeoman-generator/lib/actions/actions.js:289:15)
at KeystoneGenerator.project (/usr/local/lib/node_modules/generator-keystone/app/index.js:320:7)
at /usr/local/lib/node_modules/generator-keystone/node_modules/yeoman-generator/lib/base.js:395:14
at processImmediate [as _immediateCallback] (timers.js:367:17)
Sergius-MacBook-Pro:keystoneadmin sergiu$
答案 0 :(得分:0)
您需要更新Node.js的版本
String.prototype.includes()很可能是你的Node.js版本中的String.prototype.contains()