0

I created a library in Vue using this tutorial and the library works as expected. But problem comes I install this library and import the module into Vue project I created using yarn add ../vue-okra

and I import it into the my existing vue file as: import OkraButton from 'vue-okra' see the full snippet below:

    <template>
  <div id="app">
    <img alt="Vue logo" src="./assets/logo.png">
    <HelloWorld msg="Welcome to Your Vue.js App"/>
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'
import OkraButton from 'vue-okra'

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

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>

when I run a yarn serve on this project to see if the library works in this project, I get the error:

> This dependency was not found: * vue-okra in ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=script&lang=js&

i saw this question but it does not seem to be much help. Please, what am I doing wrong?


Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Oto-obong Eshiett
  • 1,459
  • 3
  • 18
  • 33

0 Answers0