dashersw / cote

A Node.js library for building zero-configuration microservices.

Home Page:http://cote.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using cote with Vue.js

moonkey124 opened this issue · comments

I couldn't get cote to work with Vue.js. I simply imported it but when I did that the following Error message came up: "Module not found: Error: Can't resolve 'hiredis' in 'C:\Users\public\VueProject\node_modules\redis-parser\lib'". So naturally I tried installing redis-parser but after that the same message came but with uws. I couldn't get past that even with installing uws. Maybe it is an issue with webpack. Does anyone know how to solve this and get Cote working with Vue.js? I simply imported cote like below:

<template>
  <div class="home">
    <h1>Home</h1>
  </div>
</template>

<script>
import cote from 'cote';

export default {
  name: 'home',
  components: {
  }
}
</script>

My current dependencies are:

 "dependencies": {
    "core-js": "^3.4.3",
    "cote": "^0.21.1",
    "vue": "^2.6.10",
    "vue-router": "^3.1.3",
    "vuetify": "^2.1.0",
    "vuex": "^3.1.2"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^4.1.0",
    "@vue/cli-plugin-eslint": "^4.1.0",
    "@vue/cli-plugin-router": "^4.1.0",
    "@vue/cli-plugin-vuex": "^4.1.1",
    "@vue/cli-service": "^4.1.0",
    "babel-eslint": "^10.0.3",
    "eslint": "^5.16.0",
    "eslint-plugin-vue": "^5.0.0",
    "sass": "^1.19.0",
    "sass-loader": "^8.0.0",
    "vue-cli-plugin-vuetify": "^2.0.2",
    "vue-template-compiler": "^2.6.10",
    "vuetify-loader": "^1.3.0"
  }

I dont think CoteJS is made for frontend purposes

Yeah I feared that thats the reason. I am not that experienced with Vue js yet but I guess I have to find another solution. Thanks for the reply

cote is a framework for microservices on the backend, however it has a socket.io component that lets frontends (and Vue, of course) communicate with cote microservices in the backend.