Closed bbuhler closed 8 years ago
Where did you get ignoredDependencies
from? Use exclude
https://github.com/taptapship/wiredep#configuration
@eddiemonge the ignoredDependencies
property are in my .bowerrc configuration file.
(See http://bower.io/docs/config/#bowerrc-specification)
As I tried to mention I use the exclude
property of wiredep configuration.
Using exclude
does not solve the error. Please re-open this issue.
What is your configuration? How are you using exclude?
I created a test repo where you can reproduce the error as follows:
I use the following configuration for wiredep, running via gulp:
{
exclude: [/jquery/, /bootstrap/]
}
Interesting. So the problem is that one of your dependencies require an excluded dependency. Because of that, wiredep is trying to go into that second dependency to determine what its dependencies are. So even though the parent is being excluded, it will still try to include its children. I'm not sure if this is an actual bug or an awesome feature.
So the short answer is to install them using bower then they wont get added because of the exclude.
I have the same problem. I think wiredep should accept Bower's standard way of ignoring dependencies (via ignoredDependencies
in .bowerrc) or at least do not raise errors for missing dependencies which are stated to exclude.
Installing dependencies with bower and using only exclude as it was suggested is not perfect in my case, since I use other gulp tasks to scan all bower_components and so I need to exclude the same dependencies in multiple places, which I think is not the best practice.
Ignoring dependencies via bower overrides fix the issue for me.
Eg. to wiredep fullpage.js without jquery.
"fullpage.js": {
"main": [
"./dist/jquery.fullpage.min.js"
],
"dependencies": {}
},
https://github.com/taptapship/wiredep/issues/233#issuecomment-198026349 Solves my problem.
I have created an .bowerrc file like described here.
When I run wiredep it raises the following error:
Even when I configure the ignored components to be excluded in wiredep.