Hi Ian, I'm not sure where to post this issue/suggestion so let me know if I should repost elsewhere....
The Issue:
I was going crazy with a segmentation fault in drush. Turned out I did a $npm update on a project I've been working on a while and this updated gulp as you would expect from this line in the package.json
{
"name": "pga",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"gulp": "^3.6.0"
}
}
Some time recently this installs an updated version of this dependency.
vinyl-fs@0.3.7
The gotcha is there's a .info file in it... and this kills the theme from rendering. I've got weird database exports from drush cc all and "Segementation Fault 11", on the client side or a "no data sent" error in a web client.
node_modules//gulp/node_modules/vinyl-fs/node_modules/vinyl/coverage/lcov.info
Specifying gulp 3.6 specifically
{
"name": "pga",
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"gulp": "3.6.0"
}
}
has an older dependency
vinyl-fs@0.1.4
Which does not have the .info file.
The Work-around
My work around is to hard coded the version, of gulp. The problem in other node packages I've started using (Like KSS Style guides) browser-sync also > 1.0 like to install .info files.
Suggestion
Hard-code the version of gulp in the aurora generator
Related
Here's one work around allowing .info files in themes by installing in a .npm/node_module
https://www.drupal.org/node/2309023
And I've posted a core issue which might be the place to request some way to allow node_modules in a theme
https://www.drupal.org/node/2329453
Support Request
Can you comment on if there's any way to deal with the .info files in the theme?
Comments
Comment #1
afoster CreditAttribution: afoster commentedUpdate - Actually it looks like Node will go ahead and update sub-packages even if the specific versions are stated for the parent package.
My current work around is to rename all the .info files in node_modules to *.inf
Comment #2
iamcarrico CreditAttribution: iamcarrico commentedCurrently, no.
I see you have already filed an appropriate bug report onto core (#2329453: Ignore front end vendor folders to improve directory search performance), and recognize the issue. We had a similar one with RubyGems as well, in which the solution was to rename the file to '.vendor'. Sadly, due to architectural decisions in node.js, this is not possible for the node_modules folder. In the past, I have just deleted any .info files that have come into the repo, and of course never committed them.
As for hard-coding the version of gulp, that is both ill-advised and against the principles of this project. Aurora has always been, and will continue to be, a project using the best technologies available to us. We therefore will not (as a default) limit the version, or possibilities of the theme. Alas, this is one of those "I wish I could fix it or do something better, but I cannot, and it is a little out of my hands".