Closed itsthatguy closed 8 years ago
Negative.
> ywebca-site@0.0.1 postinstall /Users/jim/code/ywebca-site
> $(npm bin)/bower install && $(npm bin)/gulp
/Users/jim/code/ywebca-site/node_modules/main-bower-files/lib/index.js:81
throw error;
^
Error: Bower components directory does not exist at /Users/jim/code/ywebca-site/bower_components
at Error (native)
at Object.module.exports (/Users/jim/code/ywebca-site/node_modules/main-bower-files/lib/index.js:76:71)
at Object.<anonymous> (/Users/jim/code/ywebca-site/gulp/config.js:10:20)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (/Users/jim/code/ywebca-site/gulp/index.js:16:1)
npm ERR! Darwin 14.4.0
npm ERR! argv "/Users/jim/.nvm/versions/node/v0.12.0/bin/node" "/Users/jim/.nvm/versions/node/v0.12.0/bin/npm" "install"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! ywebca-site@0.0.1 postinstall: `$(npm bin)/bower install && $(npm bin)/gulp`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ywebca-site@0.0.1 postinstall script '$(npm bin)/bower install && $(npm bin)/gulp'.
npm ERR! This is most likely a problem with the ywebca-site package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! $(npm bin)/bower install && $(npm bin)/gulp
npm ERR! You can get their info via:
npm ERR! npm owner ls ywebca-site
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/jim/code/ywebca-site/npm-debug.log
Ok, I think I've figured out what's causing this issue.
/Users/jim/code/ywebca-site/node_modules/main-bower-files/lib/index.js:81
There aren't any bower dependencies defined which causes the main-bower-files
package to blow up. I created a patch in gulpfile.js
to handle creating the folder if it doesn't exist. This isn't the best solution, and should actually be fixed within main-bower-files
. I will look at submitting a PR.
Another option is to check to see if the bower.json
file has any dependencies, if it doesn't: don't run $.mainBowerFiles
and instead return an empty array. Thoughts?
That's essentially what the pull request to main-bower-files
would be.
:+1:
:tea: Let me know if this fixes the issue.