php - grunt magento2 警告标志显示 magento 命令

标签 php gruntjs magento2

我在使用 grunt 时遇到问题

警告标志是

jit-grunt: Plugin for the "&&" task not found.
If you have installed the plugin already, please setting the static mapping.
See https://github.com/shootaroo/jit-grunt#static-mappings

Warning: Task "&&" failed. Used --force, continuing.

jit-grunt: Plugin for the "php" task not found.
If you have installed the plugin already, please setting the static mapping.
See https://github.com/shootaroo/jit-grunt#static-mappings

Warning: Task "php" failed. Used --force, continuing.

jit-grunt: Plugin for the "bin/magento" task not found.
If you have installed the plugin already, please setting the static mapping.
See https://github.com/shootaroo/jit-grunt#static-mappings

Warning: Task "bin/magento" failed. Used --force, continuing.

jit-grunt: Plugin for the "dev" task not found.
If you have installed the plugin already, please setting the static mapping.
See https://github.com/shootaroo/jit-grunt#static-mappings

Warning: Task "dev:source-theme:deploy" failed. Used --force, continuing.

jit-grunt: Plugin for the "css/styles-m" task not found.
If you have installed the plugin already, please setting the static mapping.
See https://github.com/shootaroo/jit-grunt#static-mappings

Warning: Task "css/styles-m" failed. Used --force, continuing.

Done, but with warnings.

完成了,但它没有将 less 转换成 css

当我查看 combo.js 文件时,上面的任务“&&”、“php”、“bin/magento”作为命令的一部分存在

请帮忙

最佳答案

Grunt 失败是因为它试图执行两个由双符号 && 连接的命令。

这是 a bug出现在 grunt-exec 2.0.0 中。升级到 3.0.0 对我没有帮助,但降级到 ~1.0.0 解决了问题。

编辑 package.json 以便 grunt-exec 的行读取:

"grunt-exec": "~1.0.0",

然后运行 ​​npm-update 来下载旧版本的包。 Grunt 应该在那之后工作。

关于php - grunt magento2 警告标志显示 magento 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47026548/

相关文章:

javascript - onkeydown/onkeypress html 和 javascript

css - 使用 Grunt 处理依赖文件并重写路径

node.js - 用于创建 EMR 集群的 Lambda 不会触发集群创建

node.js - gruntjs 0.4 registerHelper 已弃用,语法修复?

SEO 和使用 Varnish 剥离 UTM 参数

php - 将 php mysql 更改为 php mssql

PHP,如何检查MySQL表是否有名称

php - 在传递变量时执行来自 Jquery AJAX 的 cURL 请求

block - Magento 2 嵌套 block

html - 在链接替代标签中使用 hreflang 来建议特定于区域的替代方案,以避免它们被确定为重复项是否正确?