gpt4 book ai didi

node.js - 如何运行 grunt doular-server?

转载 作者:太空宇宙 更新时间:2023-11-03 22:47:16 28 4
gpt4 key购买 nike

如果我执行命令grunt docular-server

我收到错误消息:

ERROR: Could not start node server [TypeError: Object #<Object> has no method 'server']

那么文档服务器没有运行。

我安装了 grunt 来制作我的代码文档,如下所示:

 `npm install -g grunt-cli`
`npm install grunt grunt-docular`

我的Gruntfile.js看起来像这样:

module.exports = function(grunt) {

// Project configuration.
grunt.initConfig({

pkg: grunt.file.readJSON('package.json'),

docular: {
groups: [],
showDocularDocs: true,
showAngularDocs: true
}

});

// Load the plugin that provides the "docular" tasks.
grunt.loadNpmTasks('grunt-docular');

// Default task(s).
grunt.registerTask('default', ['docular']);

};

此示例取自官方网站:

http://grunt-docular.com/documentation/docular/docularinstall/installdocular

最佳答案

目前最新版本是docular@0.7.2

grunt-docular@0.1.2 不太兼容。

为了得到grunt docular-server为了工作,我必须返回到版本 0.6.6docular在我的package.json并运行npm install .

在那之后事情开始对我有用。

参见https://github.com/Vertafore/docular#new-beta-version了解详情。

显然,有一个新的维护者试图让该项目再次运行。

关于node.js - 如何运行 grunt doular-server?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24963426/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com