Vuejs3 + laravel 8 working find locally but in prod vuejs files throwing syntax error and view not render Uncaught SyntaxError: 59

Viewed 153

build a project using Vuejs 3 in Laravel 8 went running on Laravel server it works well but went I run npm run prod and deploy it in Cpanel compilation fails with Uncaught SyntaxError: 59 in the console I have remove style and script tags from blade file but still have a problem. please I really need your help

1 Answers

Please check your final html code. May be there you will find a <style>...</style> or <script>...</script> tags... These are the main problem of Uncaught SyntaxError: 59. Yes, it will be ignored in local and development environment but won't in production one... For example:

<div id="app">
    <script>
        alert('yes');
    </script>
</div>

The main idea to put script and style tags out of the div#app element.

Related