Search code examples
javascriptmavenwebjars

webjar GET error


I am trying to include the graceful-fs webjar in my web-app. I have included the following in the pom.xml file:

<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>graceful-fs</artifactId>
    <version>2.0.3</version>
</dependency>

and this line

 <script src="/webjars/graceful-fs/2.0.3/fs.js"></script>

in my index.html file.

I keep on getting the following error:

GET http://localhost:8080/webjars/graceful-fs/2.0.3/fs.js 404 (Not Found)

Any advice or idea is very welcome.


Solution

  • That file doesn't exist for that version: http://www.webjars.org/listfiles/org.webjars.npm/graceful-fs/2.0.3

    Try: http://localhost:8080/webjars/graceful-fs/2.0.3/graceful-fs.js