vime-js / vime

Customizable, extensible, accessible and framework agnostic media player. Modern alternative to Video.js and Plyr. Supports HTML5, HLS, Dash, YouTube, Vimeo, Dailymotion...
https://vimejs.com
MIT License
2.77k stars 152 forks source link

SvelteKit build fails #301

Open rhscjohn-dev opened 2 years ago

rhscjohn-dev commented 2 years ago

SvelteKit build fails with errors.

console

> Executing task: npm run build <

> sveltek-vime@0.0.1 build
> svelte-kit build

vite v2.8.6 building for production...
✓ 132 modules transformed.
.svelte-kit/output/client/_app/manifest.json                               1.87 KiB
.svelte-kit/output/client/_app/pages/__layout.svelte-238ad567.js           1.13 KiB / gzip: 0.65 KiB
.svelte-kit/output/client/_app/error.svelte-6f5e635b.js                    1.56 KiB / gzip: 0.75 KiB
.svelte-kit/output/client/_app/pages/index.svelte-a8930ff3.js              0.92 KiB / gzip: 0.53 KiB
.svelte-kit/output/client/_app/pages/svelte.svelte-8d7a9d72.js             3.29 KiB / gzip: 1.46 KiB
.svelte-kit/output/client/_app/assets/pages/__layout.svelte-4d7f0222.css   0.05 KiB / gzip: 0.06 KiB
.svelte-kit/output/client/_app/start-98cc95ed.js                           22.62 KiB / gzip: 8.47 KiB
.svelte-kit/output/client/_app/pages/html.svelte-96b66c77.js               5.74 KiB / gzip: 2.41 KiB
.svelte-kit/output/client/_app/assets/default-8d3965c8.css                 4.52 KiB / gzip: 1.19 KiB
.svelte-kit/output/client/_app/assets/pages/svelte.svelte-a9984205.css     0.37 KiB / gzip: 0.20 KiB
.svelte-kit/output/client/_app/assets/pages/html.svelte-19b5696d.css       0.16 KiB / gzip: 0.14 KiB
.svelte-kit/output/client/_app/chunks/vendor-65a3592b.js                   228.58 KiB / gzip: 55.98 KiB
vite v2.8.6 building SSR bundle for production...
transforming (126) node_modules\@vime\core\themes\default.css"Player", "Video", "DefaultUi" and "Ui" are imported from external module "@vime/core" but never used in "node_modules/@vime/svelte/src/svelte/CaptionControl.svelte", "node_modules/@vime/svelte/src/svelte/Captions.svelte", "node_modules/@vime/svelte/src/svelte/ClickToPlay.svelte", "node_modules/@vime/svelte/src/svelte/Control.svelte", "node_modules/@vime/svelte/src/svelte/ControlGroup.svelte", "node_modules/@vime/svelte/src/svelte/Controls.svelte", "node_modules/@vime/svelte/src/svelte/ControlSpacer.svelte", "node_modules/@vime/svelte/src/svelte/CurrentTime.svelte", "node_modules/@vime/svelte/src/svelte/Dailymotion.svelte", "node_modules/@vime/svelte/src/svelte/Dash.svelte", "node_modules/@vime/svelte/src/svelte/DblClickFullscreen.svelte", "node_modules/@vime/svelte/src/svelte/DefaultSettings.svelte", "node_modules/@vime/svelte/src/svelte/DefaultUi.svelte", "node_modules/@vime/svelte/src/svelte/DefaultControls.svelte", "node_modules/@vime/svelte/src/svelte/Embed.svelte", "node_modules/@vime/svelte/src/svelte/File.svelte", "node_modules/@vime/svelte/src/svelte/EndTime.svelte", "node_modules/@vime/svelte/src/svelte/FullscreenControl.svelte", "node_modules/@vime/svelte/src/svelte/Hls.svelte", "node_modules/@vime/svelte/src/svelte/Icon.svelte", "node_modules/@vime/svelte/src/svelte/IconLibrary.svelte", "node_modules/@vime/svelte/src/svelte/LiveIndicator.svelte", "node_modules/@vime/svelte/src/svelte/Menu.svelte", "node_modules/@vime/svelte/src/svelte/LoadingScreen.svelte", "node_modules/@vime/svelte/src/svelte/MenuItem.svelte", "node_modules/@vime/svelte/src/svelte/MenuRadioGroup.svelte", "node_modules/@vime/svelte/src/svelte/MenuRadio.svelte", "node_modules/@vime/svelte/src/svelte/MuteControl.svelte", "node_modules/@vime/svelte/src/svelte/PlaybackControl.svelte", "node_modules/@vime/svelte/src/svelte/PipControl.svelte", "node_modules/@vime/svelte/src/svelte/Poster.svelte", "node_modules/@vime/svelte/src/svelte/Player.svelte", "node_modules/@vime/svelte/src/svelte/Scrim.svelte", "node_modules/@vime/svelte/src/svelte/ScrubberControl.svelte", "node_modules/@vime/svelte/src/svelte/Settings.svelte", "node_modules/@vime/svelte/src/svelte/SettingsControl.svelte", "node_modules/@vime/svelte/src/svelte/Skeleton.svelte", "node_modules/@vime/svelte/src/svelte/Spinner.svelte", "node_modules/@vime/svelte/src/svelte/Slider.svelte", "node_modules/@vime/svelte/src/svelte/Submenu.svelte", "node_modules/@vime/svelte/src/svelte/Time.svelte", "node_modules/@vime/svelte/src/svelte/TimeProgress.svelte", "node_modules/@vime/svelte/src/svelte/Ui.svelte", "node_modules/@vime/svelte/src/svelte/Tooltip.svelte", "node_modules/@vime/svelte/src/svelte/Video.svelte", "node_modules/@vime/svelte/src/svelte/Vimeo.svelte", "node_modules/@vime/svelte/src/svelte/VolumeControl.svelte", "node_modules/@vime/svelte/src/svelte/Youtube.svelte", "node_modules/@vime/svelte/src/svelte/Audio.svelte", "node_modules/@vime/svelte/dist/esm/usePlayerStore.js", "node_modules/@vime/svelte/dist/esm/components/CaptionControl.js", "node_modules/@vime/svelte/dist/esm/components/Control.js", "node_modules/@vime/svelte/dist/esm/components/Captions.js", "node_modules/@vime/svelte/dist/esm/components/ClickToPlay.js", "node_modules/@vime/svelte/dist/esm/components/ControlSpacer.js", "node_modules/@vime/svelte/dist/esm/components/ControlGroup.js", "node_modules/@vime/svelte/dist/esm/components/Controls.js", "node_modules/@vime/svelte/dist/esm/components/CurrentTime.js", "node_modules/@vime/svelte/dist/esm/components/Dailymotion.js", "node_modules/@vime/svelte/dist/esm/components/Dash.js", "node_modules/@vime/svelte/dist/esm/components/DblClickFullscreen.js", "node_modules/@vime/svelte/dist/esm/components/DefaultControls.js", "node_modules/@vime/svelte/dist/esm/components/DefaultUi.js", "node_modules/@vime/svelte/dist/esm/components/Embed.js", "node_modules/@vime/svelte/dist/esm/components/DefaultSettings.js", "node_modules/@vime/svelte/dist/esm/components/EndTime.js", "node_modules/@vime/svelte/dist/esm/components/FullscreenControl.js", "node_modules/@vime/svelte/dist/esm/components/File.js", "node_modules/@vime/svelte/dist/esm/components/Hls.js", "node_modules/@vime/svelte/dist/esm/components/IconLibrary.js", "node_modules/@vime/svelte/dist/esm/components/Icon.js", "node_modules/@vime/svelte/dist/esm/components/LiveIndicator.js", "node_modules/@vime/svelte/dist/esm/components/LoadingScreen.js", "node_modules/@vime/svelte/dist/esm/components/Menu.js", "node_modules/@vime/svelte/dist/esm/components/MenuItem.js", "node_modules/@vime/svelte/dist/esm/components/MenuRadio.js", "node_modules/@vime/svelte/dist/esm/components/MenuRadioGroup.js", "node_modules/@vime/svelte/dist/esm/components/MuteControl.js", "node_modules/@vime/svelte/dist/esm/components/PipControl.js", "node_modules/@vime/svelte/dist/esm/components/PlaybackControl.js", "node_modules/@vime/svelte/dist/esm/components/Player.js", "node_modules/@vime/svelte/dist/esm/components/Poster.js", "node_modules/@vime/svelte/dist/esm/components/Scrim.js", "node_modules/@vime/svelte/dist/esm/components/ScrubberControl.js", "node_modules/@vime/svelte/dist/esm/components/Settings.js", "node_modules/@vime/svelte/dist/esm/components/SettingsControl.js", "node_modules/@vime/svelte/dist/esm/components/Skeleton.js", "node_modules/@vime/svelte/dist/esm/components/Slider.js", "node_modules/@vime/svelte/dist/esm/components/Spinner.js", "node_modules/@vime/svelte/dist/esm/components/Submenu.js", "node_modules/@vime/svelte/dist/esm/components/Time.js", "node_modules/@vime/svelte/dist/esm/components/TimeProgress.js", "node_modules/@vime/svelte/dist/esm/components/Tooltip.js", "node_modules/@vime/svelte/dist/esm/components/Ui.js", "node_modules/@vime/svelte/dist/esm/components/Video.js", "node_modules/@vime/svelte/dist/esm/components/Vimeo.js", "node_modules/@vime/svelte/dist/esm/components/VolumeControl.js", "node_modules/@vime/svelte/dist/esm/components/Audio.js", "node_modules/@vime/svelte/dist/esm/components/Youtube.js", "node_modules/@vime/svelte/dist/esm/index.js", "node_modules/@vime/svelte/src/svelte.js" and "src/routes/html.svelte".
✓ 127 modules transformed.
Generated an empty chunk: "hooks"
.svelte-kit/output/server/manifest.json                       1.92 KiB
.svelte-kit/output/server/index.js                            65.36 KiB
.svelte-kit/output/server/entries/pages/__layout.svelte.js    0.51 KiB
.svelte-kit/output/server/entries/fallbacks/error.svelte.js   0.72 KiB
.svelte-kit/output/server/entries/pages/index.svelte.js       0.39 KiB
.svelte-kit/output/server/entries/pages/svelte.svelte.js      2.84 KiB
.svelte-kit/output/server/entries/pages/html.svelte.js        3.01 KiB
.svelte-kit/output/server/chunks/index-4a89e6c9.js            3.98 KiB
.svelte-kit/output/server/chunks/usePlayerStore-8cd70170.js   38.13 KiB
.svelte-kit/output/server/chunks/hooks-1c45ba0b.js            0.00 KiB
file:///D:/Users/johni/Projects/sveltek-vime/.svelte-kit/output/server/chunks/usePlayerStore-8cd70170.js:2
import { VmAudio, VmFile, VmCaptionControl, VmControl, VmIcon, VmTooltip, VmCaptions, VmClickToPlay, VmControlGroup, VmControlSpacer, VmControls, VmCurrentTime, VmTime, VmDailymotion, VmEmbed, VmDash, VmVideo, VmDblClickFullscreen, VmDefaultControls, VmEndTime, VmFullscreenControl, VmLiveIndicator, VmMuteControl, VmPipControl, VmPlaybackControl, VmScrim, VmScrubberControl, VmSlider, VmSettingsControl, VmTimeProgress, VmVolumeControl, VmDefaultSettings, VmMenu, VmMenuItem, VmMenuRadio, VmMenuRadioGroup, VmSettings, VmSubmenu, VmDefaultUi, VmLoadingScreen, VmPoster, VmSpinner, VmUi, VmHls, VmIconLibrary, VmPlayer, VmSkeleton, VmVimeo, VmYoutube, initialState, isWritableProp } from "@vime/core";
         ^^^^^^^
SyntaxError: Named export 'VmAudio' not found. The requested module '@vime/core' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@vime/core';
const { VmAudio, VmFile, VmCaptionControl, VmControl, VmIcon, VmTooltip, VmCaptions, VmClickToPlay, VmControlGroup, VmControlSpacer, VmControls, VmCurrentTime, VmTime, VmDailymotion, VmEmbed, VmDash, VmVideo, VmDblClickFullscreen, VmDefaultControls, VmEndTime, VmFullscreenControl, VmLiveIndicator, VmMuteControl, VmPipControl, VmPlaybackControl, VmScrim, VmScrubberControl, VmSlider, VmSettingsControl, VmTimeProgress, VmVolumeControl, VmDefaultSettings, VmMenu, VmMenuItem, VmMenuRadio, VmMenuRadioGroup, VmSettings, VmSubmenu, VmDefaultUi, VmLoadingScreen, VmPoster, VmSpinner, VmUi, VmHls, VmIconLibrary, VmPlayer, VmSkeleton, VmVimeo, VmYoutube, initialState, isWritableProp } = pkg;

    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:181:5)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:281:24)
    at async Promise.all (index 1)
    at async respond$1 (file:///D:/Users/johni/Projects/sveltek-vime/.svelte-kit/output/server/index.js:1478:13)
    at async resolve (file:///D:/Users/johni/Projects/sveltek-vime/.svelte-kit/output/server/index.js:1856:105)
    at async respond (file:///D:/Users/johni/Projects/sveltek-vime/.svelte-kit/output/server/index.js:1812:22)
    at async visit (file:///D:/Users/johni/Projects/sveltek-vime/node_modules/@sveltejs/kit/dist/chunks/index2.js:1080:20)
> 500 /svelte
    at file:///D:/Users/johni/Projects/sveltek-vime/node_modules/@sveltejs/kit/dist/chunks/index2.js:979:11
    at save (file:///D:/Users/johni/Projects/sveltek-vime/node_modules/@sveltejs/kit/dist/chunks/index2.js:1199:4)
    at visit (file:///D:/Users/johni/Projects/sveltek-vime/node_modules/@sveltejs/kit/dist/chunks/index2.js:1090:3)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
The terminal process "C:\WINDOWS\System32\cmd.exe /d /c npm run build" terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

package.json

{
  "name": "sveltek-vime",
  "version": "0.0.1",
  "scripts": {
    "dev": "svelte-kit dev",
    "build": "svelte-kit build",
    "package": "svelte-kit package",
    "preview": "svelte-kit preview",
    "prepare": "svelte-kit sync"
  },
  "devDependencies": {
    "@sveltejs/adapter-auto": "next",
    "@sveltejs/kit": "next",
    "@vime/core": "^5.3.1",
    "@vime/svelte": "^5.3.1",
    "svelte": "^3.44.0"
  },
  "type": "module"
}
RickRyan26 commented 2 years ago

Fix this please! =)