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

AssetMix load error #30

Closed
kanava-ali opened this issue Jul 12, 2021 · 3 comments
Closed

AssetMix load error #30

kanava-ali opened this issue Jul 12, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@kanava-ali
Copy link

image

When I execute "npm run dev" I get this error. I have loaded the AssetMix helper in the AppView file also.

@ishanvyas22
Copy link
Owner

ishanvyas22 commented Jul 12, 2021

Just to clarify, AssetMix helper doesn't have to do anything with this error. It would be most likely issue with the Laravel mix configuration.

Have you generated the scoffoldings using generate command? Or manually did it?

Also did you faced any issues while performing installation and configuration steps?

@kanava-ali
Copy link
Author

kanava-ali commented Jul 12, 2021 via email

@ishanvyas22 ishanvyas22 added the bug Something isn't working label Jul 12, 2021
@ishanvyas22
Copy link
Owner

Got it. I was able to reproduce this issue.

Looks like you ran npm audit fix --force, it upgraded laravel-mix to version 6.x. So as a breaking change in Laravel Mix v6, you need to update your npm script as described in upgrade guide: https://laravel-mix.com/docs/6.0/upgrade#update-your-npm-scripts. Also you have to make few changes in your webpack.mix.js file in order to make it work properly.

To resolve "Module parse failed: Unexpected token (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders" error, you need to add .vue({ version: 2 }) as suggested at laravel-mix/laravel-mix#2766 (comment).

I hope this will solve your problem for this issue. Also, I think it's time that we upgrade Laravel Mix version to 6.x so I'll plan it once I get chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants