我在使用Magento 2安装Grunt时遇到了问题。
以下是两个问题:
在magento 2目录中运行npm install
npm install
npm WARN saveError ENOENT: no such file or directory, open '/var/www/html/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/var/www/html/package.json'
npm WARN html No description
npm WARN html No repository field.
npm WARN html No README data
npm WARN html No license field.
up to date in 0.089s
检查grunt - grunt clean:blank
grunt clean:blank
A valid Gruntfile could not be found. Please see the getting started guide for more information on how to configure grunt: http://gruntjs.com/getting-started
答案 0 :(得分:0)
在阅读了几篇教程后,我错过了这些内容:
在magento 2根目录中重命名这三个文件
package.json.sample
=> package.json
grunt.js.sample
=> grunt.js
grunt-config.js.sample
=> grunt-config.js
我希望这可以帮助别人并节省时间。