Skip to content

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

Closed
@fnoori

Description

@fnoori

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions