1

Hi guys I am having trouble setting up Spatie Media Library pro. I am getting following error when I am building my resources with npm run dev

ERROR in ./vendor/spatie/laravel-medialibrary-pro/resources/js/media-library-pro-vue2-attachment/dist/index.js
Module not found: Error: Can't resolve '@spatie/media-library-pro-vue2' in 'C:\Users\ermin\Code\ekupon\app\vendor\spatie\laravel-medialibrary-pro\resources\js\media-library-pro-vue2-attachment\dist'
 @ ./vendor/spatie/laravel-medialibrary-pro/resources/js/media-library-pro-vue2-attachment/dist/index.js 1:0-144 62:28-50 63:18-30 64:14-22 65:16-26 66:16-26 67:11-16 68:11-16 69:14-22
 @ ./resources/js/app.js
 @ multi ./resources/js/app.js ./resources/scss/main.scss ./resources/css/app.css

I am running Larvel 8 with inertia.js scaffolded with Vue.js (vue2).

This is my webpack config

mix.webpackConfig({
    output: { chunkFilename: 'js/[name].js?id=[chunkhash]' },
    resolve: {
        alias: {
            vue$: 'vue/dist/vue.runtime.esm.js',
            '@': path.resolve('resources/js'),
            ziggy: path.resolve('vendor/tightenco/ziggy/src/js/route.js'),
        },
        modules: [
            "node_modules",
            __dirname + "/vendor/spatie/laravel-medialibrary-pro/resources/js",
        ],
    },
});

Could this be package issue? Is anybody experiencing similar bug, or did I just miss something in my config?

apokryfos
  • 38,771
  • 9
  • 70
  • 114
svab0ni
  • 11
  • 2

2 Answers2

0

We are having the same issue. We tried to get Github packages to work in order to install @spatie/media-library-pro-vue2 as an npm dependency, but it seems the packages are not published in the npm registiry.

This is the output from npm install --save @spatie/media-library-pro-vue2

Not Found - GET https://npm.pkg.github.com/@spatie%2fmedia-library-pro-vue2 - npm package "media-library-pro-vue2" does not exist under owner "spatie"
@spatie/media-library-pro-vue2@^1.0.15' is not in the npm registry.
You should bug the author to publish it (or use the name yourself!)

The url they provide in their docs at the very bottom of this page also doesn't show any results: https://github.com/orgs/spatie/packages?repo_name=laravel-medialibrary-pro

We already tried to contact spatie with support request and we are waiting for reply.

0

Spatie released fix for this issue in their latest update

svab0ni
  • 11
  • 2