vue-aplayer icon indicating copy to clipboard operation
vue-aplayer copied to clipboard

TS2702: 'APlayer' only refers to a type, but is being used as a namespace here

Open xaiyeon opened this issue 5 years ago • 1 comments

On compile for my vue.js project that is using typescript I get this error:

ERROR in: TS2702: 'APlayer' only refers to a type, but is being used as a namespace here.

It seems to be an internal library issue based on: the index.d.ts file.

I followed the guide and have this only this: main.ts

import APlayer from '@moefe/vue-aplayer';

const logoImage = './../statics/images/logo.png'

Vue.use(Aplayer, {
  defaultCover: logoImage,
  productionTip: false,
});

component.vue:

import Vue from 'vue';
import Component from 'vue-class-component';
import { Prop } from 'vue-property-decorator'
import { getModule } from 'vuex-module-decorators';
import MusicPopupModule from './MusicPopupStoreModule';
import ZinMusicService from './../../services/drf_api/ZinMusicService'

import { APlayer } from '@moefe/vue-aplayer';

@Component({
  components: {
    APlayer,
  }
})```

xaiyeon avatar May 19 '20 20:05 xaiyeon

#357 may help you

SwingCosmic avatar Jan 24 '23 09:01 SwingCosmic