素材牛VIP会员
macos上安装grunt后执行出现的问题?
 ou***un  分类:Node.js  人气:932  回帖:2  发布于6年前 收藏

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

当创建了已经项目,项目中已经包含了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

讨论这个帖子(2)垃圾回帖将一律封号处理……

Lv6 码匠
捂***功 移动开发工程师 6年前#1

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

Lv6 码匠
lo***yo UI设计师 6年前#2
sudo npm install grunt
 文明上网,理性发言!   😉 阿里云幸运券,戳我领取