You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to get chjj/marked installed with grunt bower-install. I forked it and renamed component.json to bower.json thinking this would fix the error "marked was not injected into your file".
No main is found, and the package doesn't get injected. Switching the position of those two would be easier than tracking down the problem within bower. Why does wiredep look at .bower.json first?
The text was updated successfully, but these errors were encountered:
Thanks for reporting. .bower.json is preferred first, since it should contain the most data it can find from a Bower package. I've never heard of it failing to include some of the properties, such as main. This sounds like a bug in Bower, but regardless, maybe wiredep shouldn't rely on the .bower.json file. Feel free to send a PR to remove '.bower.json' from the array, otherwise I'll try to get to it soon.
Trying to get chjj/marked installed with
grunt bower-install
. I forked it and renamed component.json to bower.json thinking this would fix the error "marked was not injected into your file".Traced the problem into wiredep, and bower.
Bower writes a package metadata file into
.bower.json
which doesn't seem to have the "main" attribute that is necessary for wiredep to find the file to inject. (https://github.com/bower/bower/blob/b64d8bfab32b1c7112ce024879b0b7f072c5f80b/lib/core/resolvers/Resolver.js)After running bower install, here are the two files.
.bower.json
bower.json
Because wiredep looks at .bower.json first
https://github.com/stephenplusplus/wiredep/blob/master/lib/detect-dependencies.js#L28
No
main
is found, and the package doesn't get injected. Switching the position of those two would be easier than tracking down the problem within bower. Why does wiredep look at.bower.json
first?The text was updated successfully, but these errors were encountered: