yeoman generator-aspnet语法错误bootstrap

时间:2015-04-16 12:04:14

标签: asp.net-mvc yeoman-generator yo

我在OSX上,当我尝试启动以下命令时出现以下错误:

yo aspnet
undefined:6
    "bootstrap": "~3.0.3"
    ^
SyntaxError: Unexpected string
    at Object.parse (native)
    at EditionInterface.module.exports [as readJSON] (/usr/local/lib/node_modules/generator-aspnet/node_modules/yeoman-generator/node_modules/mem-fs-editor/actions/read-json.js:5:17)
    at Base.determineAppname (/usr/local/lib/node_modules/generator-aspnet/node_modules/yeoman-generator/lib/base.js:735:25)
    at Base (/usr/local/lib/node_modules/generator-aspnet/node_modules/yeoman-generator/lib/base.js:150:23)
    at new yeoman.generators.Base.extend.constructor (/usr/local/lib/node_modules/generator-aspnet/app/index.js:9:32)
    at Environment.instantiate (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:282:10)
    at Environment.create (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:259:15)
    at Environment.run (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:318:24)
    at /usr/local/lib/node_modules/yo/lib/cli.js:86:9
    at Environment.resolver.lookup (/usr/local/lib/node_modules/yo/node_modules/yeoman-environment/lib/resolver.js:50:12)

我是npm的大菜鸟,所以有人可以帮助我并告诉我如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

问题是生成器正在尝试读取JSON文件。但是该JSON文件包含无效的JSON语法,因此生成器无法读取它。

也许您编辑了一个语法无效的JSON文件?

如果您没有修改任何json文件,那么您应该在generator-aspnet上打开一个问题。