Drupal 7.引导程序和咕unt声

理查德·斯金纳

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

警告:opendir(sites / all / themes / custom / theme / vendor / bootstrap / node_modules / grunt-contrib-jade / node_modules / jade / node_modules / transformers / node_modules / uglify-js / node_modules / optimist / node_modules / wordwrap,sites / all / themes / custom / 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()中(C:\ Users \ user \ Documents \ Program Files \ xampp \ htdocs \ drupal \ includes \ file.inc的第2118行)。

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

我是Grunt和Nodejs的新手。

任何帮助深表感谢。

莫里饼干

对于将来发现此问题的人-问题似乎是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

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章