# Problems using dgraph-js-http and dgraph-js with VUE

**URL:** <https://discuss.dgraph.io/t/problems-using-dgraph-js-http-and-dgraph-js-with-vue/7684>\
**Category:** App Development\
**Tags:** dgraph-js-http, vuejs\
**Created:** [August 15, 2018, 11:36pm UTC](https://discuss.dgraph.io/t/problems-using-dgraph-js-http-and-dgraph-js-with-vue/7684 "2018-08-15T23:36:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [August 15, 2018, 11:36pm UTC](https://discuss.dgraph.io/t/problems-using-dgraph-js-http-and-dgraph-js-with-vue/7684/1 "2018-08-15T23:36:20Z")

</div>

_Posted by_ [erlendoverby](https://github.com/erlendoverby):

When importing dgraph-js or dgraph-js-http into VUE JS, I get errors.

## Environment:

- npm 6.3.0
- vue-cli 3.0.0-rc.11

## To replicate do the following:

> vue create dgraph\_project

- select manually (babel, router, vuex)  
– the other choices are not that relevant.

> cd dgraph\_project  
> yarn add dgraph-js-http grpc dgraph-js

Add the following to the src/main.js file

```javascript
import dgraph from 'dgraph-js'

```

> yarn serve

Goto [http://localhost:8080/](http://localhost:8080/) and check the console log in the browser.

# Errors

## For dgraph-js

**TypeError: process.version is undefined**

## For dgraph-js-http

**[Vue warn]: Error in render: “TypeError: dgraph\_js\_http\_\_WEBPACK\_IMPORTED\_MODULE\_0\_\_\_default.a is undefined”**  
When I try to invoke the library by running the simple example.

I suspect that the use webpack 4 might be the reason for this problem.  
However, I would appreciate if the dgraph-js library could work “out of the box” with vue-cli v3 and webpack 4.

Sorry for the trouble.

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [February 12, 2019, 1:26pm UTC](https://discuss.dgraph.io/t/problems-using-dgraph-js-http-and-dgraph-js-with-vue/7684/2 "2019-02-12T13:26:37Z")

</div>

[paulftw](https://github.com/paulftw) _commented_ :

dgraph-js is Node.js only and is not supposed to work in browser.  
Will take a look at what’s wrong with dgraph-js-http. It works for me with create-react-app

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [March 1, 2019, 5:53pm UTC](https://discuss.dgraph.io/t/problems-using-dgraph-js-http-and-dgraph-js-with-vue/7684/3 "2019-03-01T17:53:24Z")

</div>

[paulftw](https://github.com/paulftw) _commented_ :

Closing as stale. Please try with the latest version of dgraph-js-http and re-open if it is still broken in vue.

---

<div class="post-metadata">

**Author:** ![diggy](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/diggy/32/3666_2.png) [@diggy](https://discuss.dgraph.io/u/diggy)\
**Post date:** [July 11, 2020, 1:12am UTC](https://discuss.dgraph.io/t/problems-using-dgraph-js-http-and-dgraph-js-with-vue/7684/4 "2020-07-11T01:12:21Z")

</div>


