大家好,我在设置 Spatie Media Library pro 时遇到问题。使用 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
我正在运行带有 Vue.js (vue2) 脚手架的惯性.js 的 Larvel 8。
这是我的 webpack 配置
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",
],
},
});
这可能是包裹问题吗?是否有人遇到过类似的错误,或者我只是错过了配置中的某些内容?