# Error "Cannot resolve module 'fs'"

**URL:** <https://discuss.elastic.co/t/error-cannot-resolve-module-fs/77003>\
**Category:** Kibana\
**Created:** [March 1, 2017, 2:49pm UTC](https://discuss.elastic.co/t/error-cannot-resolve-module-fs/77003 "2017-03-01T14:49:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![valereds](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@valereds](https://discuss.elastic.co/u/valereds)\
**Post date:** [March 1, 2017, 2:49pm UTC](https://discuss.elastic.co/t/error-cannot-resolve-module-fs/77003/1 "2017-03-01T14:49:10Z")

</div>

Hi all,  
I'm trying to include canvg library by require command inside my plugin controller but on kibana startup log shows me an error like the one in the title and application do not start.  
Which is the suggested way to solve this issue?  
There is another way to include external library then the one with require command?  
Thanks

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [March 1, 2017, 6:01pm UTC](https://discuss.elastic.co/t/error-cannot-resolve-module-fs/77003/2 "2017-03-01T18:01:40Z")

</div>

Looks like canvg on npm is not the same as [https://github.com/canvg/canvg](https://github.com/canvg/canvg). You will need to either install this module using npm's support for github:

```auto
npm install canvg/canvg

```

or download it to your plugin source directory (along with it's dependencies).

---

<div class="post-metadata">

**Author:** ![valereds](https://avatars.discourse-cdn.com/v4/letter/v/f19dbf/32.png) [@valereds](https://discuss.elastic.co/u/valereds)\
**Post date:** [March 3, 2017, 10:40am UTC](https://discuss.elastic.co/t/error-cannot-resolve-module-fs/77003/3 "2017-03-03T10:40:48Z")

</div>

Hi spalger,  
yes installing canvg/canvg from npm solve the issue.  
But I've always problems when adding other external libraries.  
Maybe I'm to noob with webpack, is there a place to study how to approach with external libraries inside kibana?  
Thnak you so much

---

<div class="post-metadata">

**Author:** ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)\
**Post date:** [March 3, 2017, 8:07pm UTC](https://discuss.elastic.co/t/error-cannot-resolve-module-fs/77003/4 "2017-03-03T20:07:43Z")

</div>

There is a little information available here: [https://www.elastic.co/guide/en/kibana/current/development-dependencies.html](https://www.elastic.co/guide/en/kibana/current/development-dependencies.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 31, 2017, 8:08pm UTC](https://discuss.elastic.co/t/error-cannot-resolve-module-fs/77003/5 "2017-03-31T20:08:03Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
