Node.js 呼噜参考误差 Grunfile.js 错误消息 初始化 命令行选项:--verbose 正在阅读“Gruntfile.js”Gruntfile…好的 正在注册GrunFile任务。 正在加载“Gruntfile.js”任务…错误 ReferenceError:未定义grunt 反对。(C:\Users\gs1460\Desktop\Markdownfiles\api\grunfile.js:1:90) 在模块处编译(Module.js:456:26) 在Object.Module.\u extensions..js(Module.js:474:10) 在Module.load(Module.js:356:32) 在Function.Module.\u加载(Module.js:312:12) at Module.require(Module.js:364:17) 根据需要(模块js:380:17) 在loadTask(C:\Users\gs1460Desktop\Markdownfiles\api\node\u modules\grunt\lib\grunt\task.js:323:10) 在Task.Task.init(C:\Users\gs1460\Desktop\Markdownfiles\api\node\u modules\grunt\lib\grunt\Task.js:437:5) 在Object.grunt.tasks(C:\Users\gs1460\Desktop\Markdownfiles\api\node\u modules\grunt\lib\grunt.js:120:8) 在Object.module.exports[作为cli](C:\Users\gs1460\Desktop\Markdownfiles\api\node\u modules\grunt\lib\grunt\cli.js:38:9) 正在运行的任务:concat:dist 警告:未找到任务“concat:dist”。使用--force继续。 由于警告而中止。
我如何消除这个错误。Node.js 呼噜参考误差 Grunfile.js 错误消息 初始化 命令行选项:--verbose 正在阅读“Gruntfile.js”Gruntfile…好的 正在注册GrunFile任务。 正在加载“Gruntfile.js”任务…错误 ReferenceError:未定义grunt 反对。(C:\Users\gs1460\Desktop\Markdownfiles\api\grunfile.js:1:90) 在模块处编译(Module.js:456:26) 在Object.Module.\u extensions..js(Module.js:474:10) 在Module.load(Module.js:356:32) 在Function.Module.\u加载(Module.js:312:12) at Module.require(Module.js:364:17) 根据需要(模块js:380:17) 在loadTask(C:\Users\gs1460Desktop\Markdownfiles\api\node\u modules\grunt\lib\grunt\task.js:323:10) 在Task.Task.init(C:\Users\gs1460\Desktop\Markdownfiles\api\node\u modules\grunt\lib\grunt\Task.js:437:5) 在Object.grunt.tasks(C:\Users\gs1460\Desktop\Markdownfiles\api\node\u modules\grunt\lib\grunt.js:120:8) 在Object.module.exports[作为cli](C:\Users\gs1460\Desktop\Markdownfiles\api\node\u modules\grunt\lib\grunt\cli.js:38:9) 正在运行的任务:concat:dist 警告:未找到任务“concat:dist”。使用--force继续。 由于警告而中止。,node.js,gruntjs,grunt-contrib-concat,grunt-cli,Node.js,Gruntjs,Grunt Contrib Concat,Grunt Cli,我如何消除这个错误。 我需要将md文件连接到一个文件。这会导致上面的错误。多次尝试更改代码。但同样的问题。您能在这方面提供帮助吗。问题可能是您编写的是函数,而不是函数。 还要检查变量grunt是否在正确的范围内。请正确使用标签 module.exports = function(grunt) 问候。您是否在全球范围内安装了grunt/grunt cli? Initializing Command-line options: --verbose Reading "Gruntfile.js" G
我需要将md文件连接到一个文件。这会导致上面的错误。多次尝试更改代码。但同样的问题。您能在这方面提供帮助吗。问题可能是您编写的是
函数
,而不是函数
。
还要检查变量grunt是否在正确的范围内。请正确使用标签
module.exports = function(grunt)
问候。您是否在全球范围内安装了
grunt
/grunt cli
?
Initializing
Command-line options: --verbose
Reading "Gruntfile.js" Gruntfile...OK
Registering Gruntfile tasks.
Loading "Gruntfile.js" tasks...ERROR
ReferenceError: grunt is not defined
at Object.<anonymous> (C:\Users\gs1460\Desktop\Markdownfiles\apis\Gruntfile.js:1:90)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at loadTask (C:\Users\gs1460Desktop\Markdownfiles\apis\node_modules\grunt\lib\grunt\task.js:323:10)
at Task.task.init (C:\Users\gs1460\Desktop\Markdownfiles\apis\node_modules\grunt\lib\grunt\task.js:437:5)
at Object.grunt.tasks (C:\Users\gs1460\Desktop\Markdownfiles\apis\node_modules\grunt\lib\grunt.js:120:8)
at Object.module.exports [as cli] (C:\Users\gs1460\Desktop\Markdownfiles\apis\node_modules\grunt\lib\grunt\cli.js:38:9)
Running tasks: concat:dist
Warning: Task "concat:dist" not found. Use --force to continue.
Aborted due to warnings.
module.exports = function(grunt)