【问题标题】:Drupal 7. Bootstrap and GruntDrupal 7. Bootstrap 和 Grunt
【发布时间】:2014-12-05 16:55:32
【问题描述】:

我正在尝试使用 Bootstrap 和 Grunt 作为编译器。将 Drupal 7 站点的所有内容安装到我的自定义主题中。我通过 npm install 下载了它的所有依赖项,这又添加了一个 node_modules 文件夹。现在使用 grunt 编译等一切都很好,我的问题在于当你去 Drupal 时我收到这个警告......

警告: opendir(站点/所有/主题/自定义/主题/供应商/bootstrap/node_modules/grunt-contrib-jade/node_modules/jade/node_modules/transformers/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap,sites/all/主题/自定义/lmax_hk/vendor/bootstrap/node_modules/grunt-contrib-jade/node_modules/jade/node_modules/transformers/node_modules/uglify-js/node_modules/optimist/node_modules/wordwrap): 该系统找不到指定的路径。 (代码:3)在 file_scan_directory()(第 2118 行 C:\用户\用户\文档\程序 文件\xampp\htdocs\drupal\includes\file.inc)。

我不知道为什么,也没有找到任何可能导致答案的东西。

我是 Grunt 和 Nodejs 的新手。

非常感谢任何帮助。

【问题讨论】:

    标签: node.js twitter-bootstrap drupal-7 gruntjs


    【解决方案1】:

    对于以后发现这个问题的人 - 问题似乎是 Drupal 核心正在解析 gulp / grunt / npm .info 文件。 Drupal 8 不再使用 .info 文件,但 Drupal 7 会抛出错误。似乎有一个针对 D7 核心的补丁,但在那之前,解决方法是创建一个安装后脚本来删除 package.json 文件中的 .info 文件。

    "scripts": {
        "postinstall": "find node_modules/ -name '*.info' -type f -delete"
      }
    

    drupal.org 上的相关主题: https://www.drupal.org/node/2329453#comment-9160735

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-04
      • 1970-01-01
      • 2012-06-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多