无法找到Grunt
Unable to Locate Grunt
很抱歉,我可以想象这个问题在过去也出现过,但尽管尝试了各种不同的修复方法,我仍然没有取得任何进展。
因此,我根据Youtube剪辑中的说明在当前服务器上设置了Node、NPM和Expresshttps://www.youtube.com/watch?v=OhPFgqHz68o
我已使用node server/index.js
在此之后,在我的终端中的一个新选项卡中,我使用了cd server
,然后使用npm install
,然后生成以下内容:npm WARN package.json MeanApp@1.0.0 No description
npm WARN package.json MeanApp@1.0.0 No repository field.
npm WARN package.json MeanApp@1.0.0 No README data
然后我运行npm install grunt --save-dev
,它生成以下内容:npm WARN package.json MeanApp@1.0.0 No description
npm WARN package.json MeanApp@1.0.0 No repository field.
npm WARN package.json MeanApp@1.0.0 No README data
grunt@0.4.5 node_modules/grunt
├── which@1.0.9
├── dateformat@1.0.2-1.2.3
├── eventemitter2@0.4.14
├── getobject@0.1.0
├── rimraf@2.2.8
├── colors@0.6.2
├── async@0.1.22
├── hooker@0.2.3
├── grunt-legacy-util@0.2.0
├── exit@0.1.2
├── nopt@1.0.10 (abbrev@1.0.5)
├── minimatch@0.2.14 (sigmund@1.0.0, lru-cache@2.5.0)
├── lodash@0.9.2
├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.3)
├── coffee-script@1.3.3
├── underscore.string@2.2.1
├── iconv-lite@0.2.11
├── findup-sync@0.1.3 (glob@3.2.11, lodash@2.4.1)
├── grunt-legacy-log@0.1.1 (underscore.string@2.3.3, lodash@2.4.1)
└── js-yaml@2.0.5 (esprima@1.0.4, argparse@0.1.16)
之后,我运行了grunt server
,结果是:找不到有效的Gruntfile。请参阅的入门指南有关如何配置grunt的更多信息:http://gruntjs.com/getting-started致命错误:找不到Gruntfile。
然而,我在电脑上的服务器文件夹中查看过,它包含grunt,在节点模块>grunt>lib>grunt.js 中
请帮帮我,我快把自己逼疯了。
当您运行grunt serve
时,Grunt正在根目录中查找一个名为Gruntfile.js
的文件,该文件是您编写所有Grunt任务的地方。
你在node_modules/grunt/lib/grunt.js
中找到的文件实际上就是Grunt本身。
我建议你阅读Grunt提供的《入门指南》,它会让你清楚地了解如何正确设置Grunt,以及如何将其与你的项目相结合。
- Grunt匹配正则表达式
- 为什么grunt contrib connect的中间件选项的第三个参数是未定义的
- 如何将package.json数组传递给grunt.js
- Grunt-connect在根目录之外提供静态文件
- 如果助手不在,如何从Grunt中的代码中调用任务
- Grunt构建导致Angular应用程序在dist上崩溃
- grunt上的压缩文件夹不起作用
- 你能把grunt.js中的linter改成jslint吗
- Grunt-将多个文件最小化/处理为一个文件
- Grunt concat js angularjs 不起作用
- 如何为requirejs和qunit设置grunt任务
- Grunt从typescript源生成空文件
- 为什么Grunt Copy给了我一个'undefined不是函数'警告
- 检查grunt是否在详细模式下运行
- 无法加载Ace.js编辑器模式和主题(命名空间项目&AMD require.js&grunt
- 不使用Grunt.initConfig()注册Grunt任务
- 使用grunt模块创建svg精灵
- Grunt任务没有加载,获得无限循环
- Grunt没有't更改bower_components
- 向localhost发出带有grunt的代理CORS请求