node.js - grunt 运行报错

 宠医_臻爱一生_156 发布于 2022-11-05 23:56

grunt-cli: The grunt command line interface. (v0.1.13)

Fatal error: Unable to find local grunt.

If you're seeing this message, either a Gruntfile wasn't found or
grunt hasn't been installed locally to your project. For more
information about installing and configuring grunt, please see the
Getting Started guide:

http://gruntjs.com/getting-started
应该是Gruntfile丢失了,
尝试了重新安装也没用。怎么解决呢。。。各位。。。系统macOSX

4 个回答
  • 这个错跟Gruntfile无关,如果没有Gruntfile的话grunt会提示找不到这个文件的。
    你这个错事没有本地grunt啊,在项目目录执行:

    $ npm install grunt --save-dev
    2022-11-10 19:10 回答
  • node环境变量配置有问题

    2022-11-10 19:21 回答
  • cd 到项目根目录

    npm install

    2022-11-10 19:27 回答
  • Gruntfile.js是自己写的Grunt配置文件,是需要自己写的!!!

    2022-11-10 19:27 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有