npm run prod breaking site - Uncaught SyntaxError: 60
See original GitHub issue- Laravel Mix Version: 6.0.31
- Node Version (
node -v
): 16.10.0 - NPM Version (
npm -v
): 7.24.0 - OS: Ubuntu 18.04
Description:
When I run npm run prod
everything runs successfully, although I get an error on app.min.js
Uncaught SyntaxError: 60
If I run npm run dev
, everything is fine.
webpack
mix.js([
'resources/js/app.js',
], 'public/js/app.js')
.vue()
.minify('public/js/app.js')
if (mix.inProduction()) {
mix.version();
}
Some of the packages in package.json
"scripts": {
"dev": "mix",
"development": "mix",
"watch": "mix watch",
"watch-poll": "mix watch -- --watch-options-poll=1000",
"hot": "mix watch --hot",
"prod": "mix --production",
"production": "mix --production"
},
"laravel-mix": "^6.0.31",
"vue": "^3.2.19",
"vue-loader": "^16.8.1",
"vue-template-compiler": "^2.6.10"
Steps To Reproduce:
- npm run prod
- Visit site
Issue Analytics
- State:
- Created 2 years ago
- Comments:7
Top Results From Across the Web
'npm run build' gives me uncaught syntax error - Stack Overflow
'npm run build' gives me uncaught syntax error: Unexpected token '<' when I try to render the html file for my single page...
Read more >pdf2json - npm
PDF file parser that converts PDF binaries to text based JSON, powered by porting a fork of PDF.JS to Node.js. Latest version: 3.0.2, ......
Read more >Unexpected token 'export'' mean when running 'npm ... - Quora
It means that whoever wrote the NPM scripts for your project configured the server command to execute a particular JavaScript file (or possibly...
Read more >How to fix the Whitescreen After a Static Deployment with ...
But as you visit the site – instead of your freshly deployed app – you ... Now that we told your app it's...
Read more >npm run dev.. or webpack broke.. it's not doing anything but ...
Figured it out.. duplicate configs with plugins in the webpack.mix.js file was making it choke. Derp. At least it's fixed now.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am having a similar issue and it appears to triggered if there is a <script> tag contained within the designated div for your vue application.
I am having a similar issue and it appears to triggered if there is a <style> tag contained within the designated div for your vue application.