首页 > macos上安装grunt后执行出现的问题?

macos上安装grunt后执行出现的问题?

按照官网的步骤来安装的:

当创建了已经项目,项目中已经包含了gruntfile.js和packge.json等文件,当时在项目下执行grunt时候出现了下班错误提示,在node_modules中已经存在了grunt和grunt-cli

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

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

问题已经解决,安装配置文件问题。设置为不允许全局安装方式。


sudo npm install grunt
【热门文章】
【热门文章】