Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue.config is not defined #391

Open
detrix42 opened this issue Nov 23, 2022 · 0 comments
Open

Vue.config is not defined #391

detrix42 opened this issue Nov 23, 2022 · 0 comments

Comments

@detrix42
Copy link

I have use Trix in a Ruby on Rails project. Trying to do this with Vue and Ruby on Rails as a backend API. After Starting a bare bones Vue project, and installing vue-trix via yarn, and importing vue-trix

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

  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";
import VueTrix from "vue-trix";

export default {
  name: "HomeView",
  components: {
    HelloWorld,
    // VueTrix,
  },
};
</script>

I get the following error (stack trace):

app.js:483 **Uncaught TypeError: Cannot read properties of undefined (reading 'config')**
    at eval (index.js?5a60:9:1)
    at ./node_modules/vue-trix/dist/vue-trix.esm.js (chunk-vendors.js:215:1)
    at __webpack_require__ (app.js:480:33)
    at fn (app.js:735:21)
    at eval (index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/views/HomeView.vue?vue&type=script&lang=js:3:66)
    at ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/views/HomeView.vue?vue&type=script&lang=js (app.js:30:1)
    at __webpack_require__ (app.js:480:33)
    at fn (app.js:735:21)
    at eval (HomeView.vue?vue&type=script&lang=js:5:211)app.js:483 Uncaught TypeError: Cannot read properties of undefined (reading 'config')
    at eval (index.js?5a60:9:1)
    at ./node_modules/vue-trix/dist/vue-trix.esm.js (chunk-vendors.js:215:1)
    at __webpack_require__ (app.js:480:33)
    at fn (app.js:735:21)
    at eval (index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/views/HomeView.vue?vue&type=script&lang=js:3:66)
    at ./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/views/HomeView.vue?vue&type=script&lang=js (app.js:30:1)
    at __webpack_require__ (app.js:480:33)
    at fn (app.js:735:21)
    at eval (HomeView.vue?vue&type=script&lang=js:5:211)
    at ./src/views/HomeView.vue?vue&type=script&lang=js (app.js:173:1)
    at ./src/views/HomeView.vue?vue&type=script&lang=js (app.js:173:1)

I started the app via vue cli version 5.0.6. This seems to be more of a Vue issue. But I could not find any answers. No one else seem to be having this problem. I apologize if this is not the right place to ask.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant