Closed (fixed)
Project:
ZURB Foundation
Version:
8.x-6.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Jun 2015 at 22:43 UTC
Updated:
28 Mar 2016 at 20:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
corbacho commentedWe are trying to fix this in core https://www.drupal.org/node/2329453
Comment #2
kevinquillen commentedA workaround for now is to update package.json to include
rimrafpackage and add this as a post install script. It will run through and clean up info files in node_modules to avoid segfaulting drupal. I wouldn't wait for core, because this has gone on for some time now.Example:
rimrafworks on Windows/OSX (haven't tried on Linux). Now anytime npm install is ran, that command will clean up the files.Comment #3
kevinquillen commentedComment #4
kevinquillen commentedThe same fix can be applied for Drupal 8 (I've used extensively in other themes) to prevent segfault. Drupal 8 core has supposedly fixed the behavior, but it still occurred for me. So instead of white screen everyone, we can do this until it is resolved. Not to mention, prior versions of core for 7.x and 8.x will still segfault regardless, so it doesn't hurt to have grunt or gulp execute this.
Comment #5
kevinquillen commentedThis change can be easily backported.
Comment #6
kevinquillen commentedHere is a patch that just ran successfully for me. It deletes all *.info files from the node_modules.
After this, it should not segfault anymore. I have ran into this on various other projects and this kills it dead in its tracks until core can patch it up.
Comment #7
kevinquillen commentedComment #8
kevinquillen commentedDo note that the patch for 8.x-6.x is for Gulp, while lower versions are using Grunt. However, it should work exactly the same, as only package.json is affected - meaning, if this works, we will backport down and test.
Comment #9
kevinquillen commentedDev branches of 7.x-5.x, 8.x-5.x and 8.x-6.x have been updated with this fix. I was able to reproduce on all, and not reproduce after the changes were applied.
rimraf is being added to emulate the rm -rf command, so this will also work on Windows as well.
If you have made modifications to your subtheme Gulpfile/Gruntfile, for instance, changing install directory paths or other customizations, you may need to tweak the post install command to point to your bin directory appropriately.
If your site is segfaulting prior to this, delete node_modules and run npm install again, clear caches and reload.
Comment #10
kevinquillen commented