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

Uncaught TypeError: Super expression must either be null or a function #1646

Closed
fnoori opened this issue Jul 20, 2020 · 2 comments
Closed

Uncaught TypeError: Super expression must either be null or a function #1646

fnoori opened this issue Jul 20, 2020 · 2 comments

Comments

@fnoori
Copy link

fnoori commented Jul 20, 2020

Version

3.0.0-rc.2

Reproduction link

https://codesandbox.io/s/dreamy-oskar-910m7?file=/src/shims-vue.d.ts

Steps to reproduce

Followed steps from this link to setup a Vue 3 project.
https://www.vuemastery.com/blog/vue-3-start-using-it-today/

  1. vue create project_name
  2. cd project_name
  3. npm run serve
  4. vue add vue-next
  5. Edit the package.json to use the latest Vue beta version
  6. npm install
  7. npm run serve

What is expected?

To not get errors/warnings

What is actually happening?

Getting errors and warnings.
In the terminal:

Module '"../../node_modules/vue-router/dist/vue-router"' has no exported member 'RouteConfig'.
  > 1 | import { RouteConfig, createRouter, createWebHistory } from 'vue-router'
      |          ^
    2 | import Home from '../views/Home.vue'
    3 | 
    4 | const routes: Array<RouteConfig> = [
Property 'createStore' does not exist on type '{ Store: typeof Store; mapState: Mapper<Computed> & MapperWithNamespace<Computed> & MapperForState & MapperForStateWithNamespace; ... 4 more ...; createLogger: <S>(option?: LoggerOption<...> | undefined) => Plugin<...>; }'.
    1 | import Vuex from 'vuex'
    2 | 
  > 3 | export default Vuex.createStore({
      |                     ^
    4 |   state: {
    5 |   },
    6 |   mutations: {

In the browsers console:

Uncaught TypeError: Super expression must either be null or a function
    node_modules inherits.js:7
    HelloWorld HelloWorld.vue:5
    <anonymous> HelloWorld.vue:5

The codesandbox.io does not accurately reproduce the error, not sure why, because I uploaded my GitHub repo to it.

@posva
Copy link
Member

posva commented Jul 20, 2020

The CLI plugin for vue-next is still WIP: vuejs/vue-cli#5637. Since you are also using Vue-property-decorator, you will also need to make sure to use the correct versions: kaorun343/vue-property-decorator#294

Some types like RouteConfig have been renamed, so please refer to each project documentation or README to find those (e.g. https://github.com/vuejs/vue-router-next#typings).

There is quite a lot to this but it's not a bug on Vue. I recommend you to use the Discord server to ask questions.

@posva posva closed this as completed Jul 20, 2020
@fnoori
Copy link
Author

fnoori commented Jul 21, 2020

The CLI plugin for vue-next is still WIP: vuejs/vue-cli#5637. Since you are also using Vue-property-decorator, you will also need to make sure to use the correct versions: kaorun343/vue-property-decorator#294

Some types like RouteConfig have been renamed, so please refer to each project documentation or README to find those (e.g. https://github.com/vuejs/vue-router-next#typings).

There is quite a lot to this but it's not a bug on Vue. I recommend you to use the Discord server to ask questions.

Makes sense, thanks for the reply.
I will use the discord server for future questions.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants