From b18e61e0fd0f186b136ca43237336c9f592b8a52 Mon Sep 17 00:00:00 2001 From: Peter Haight Date: Tue, 30 Dec 2014 18:04:16 -0800 Subject: [PATCH] Fixed drush and node_modules/*.info file conflict Tim noticed that drush doesn't work when node_modules directory exists. People say that it's because of the *.info files that some things have in node_modules and suggested adding a line to the npm postinstall script to remove any *.info files from there because they aren't really needed to run stuff. Because we are already doing brower install in the postinstall script, I broke the postinstall stuff into a separate script and put both things in there. --- bin/npm_postinstall.sh | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 bin/npm_postinstall.sh diff --git a/bin/npm_postinstall.sh b/bin/npm_postinstall.sh new file mode 100644 index 0000000000..9308d36442 --- /dev/null +++ b/bin/npm_postinstall.sh @@ -0,0 +1,2 @@ +find node_modules/ -name '*.info' -type f -delete +node node_modules/bower/bin/bower install diff --git a/package.json b/package.json index 386b8cca18..51a99add26 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "karma-jasmine": "~0.3.2" }, "scripts": { - "postinstall": "node node_modules/bower/bin/bower install", + "postinstall": "bash bin/npm_postinstall.sh", "test": "node node_modules/karma/bin/karma start tests/karma.conf.js" } } -- 2.25.1