Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control panel not working due to addon #184

Open
geertjanknapen1 opened this issue Oct 14, 2024 · 2 comments
Open

Control panel not working due to addon #184

geertjanknapen1 opened this issue Oct 14, 2024 · 2 comments

Comments

@geertjanknapen1
Copy link

geertjanknapen1 commented Oct 14, 2024

Heya folks, I've recently updated to Laravel 11 and Statamic 5. But now, whenever I try to access the control panel, I run into the following issue:

Vite manifest not found at: /usr/share/nginx/html/public/vendor/aardvark-seo/build/manifest.json
(View: /usr/share/nginx/html/vendor/statamic/cms/resources/views/partials/scripts.blade.php)
(View: /usr/share/nginx/html/vendor/statamic/cms/resources/views/partials/scripts.blade.php)
(View: /usr/share/nginx/html/vendor/statamic/cms/resources/views/partials/scripts.blade.php)

I saw the addon was updated to use Vite, instead of Webpack.
I'm still using Webpack, could that be the problem.

I've set-up my webpack.mix.js file as follows:

const mix = require('laravel-mix');
const path = {
    node_modules: 'node_modules/',
    sourceResources: 'resources/',
    sourceVendor: 'vendor/',
    destPublic: 'public/',
    destStorage: 'public/storage/',
    destVendor: 'public/vendor/',
};

// ...
// other stuff
// ...

mix.copyDirectory(path.sourceVendor + 'withcandour/aardvark-seo/resources/', path.destVendor + 'aardvark-seo')

Update

Even when I remove mix.copyDirectory(path.sourceVendor + 'withcandour/aardvark-seo/resources/', path.destVendor + 'aardvark-seo') from the webpack.mix.js file, or replace it with the following .copyDirectory(path.sourceVendor + 'withcandour/aardvark-seo/resources/dist', path.destVendor + 'aardvark-seo/build'), the error keeps persisting.

@geertjanknapen1
Copy link
Author

Update 2

I can get around it (once) by deleting vendor/withcandour and then running composer install.

But the moment I run npm run dev again, I am greeted by the same Vite manifest error again.

@geertjanknapen1
Copy link
Author

Seems to happen due to the CleanWebpackPlugin deleting some things which it shouldn't..

.webpackConfig({
        plugins: [
            new CleanWebpackPlugin({
                dry: false,
                verbose: false,
                cleanOnceBeforeBuildPatterns: [
                    '**/*',
                    '!storage/**',
                    '!index.php',
                    '!robots.txt',
                    '!favicon.ico',
                    '!d/**',
                    '!tds/**',
                ],
            }),
        ],
        output: {
            publicPath: path.destPublic,
        },
        stats: {
            children: true,
        }
    })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant