question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:

  1. npm run prod
  2. Visit site

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

6reactions
gedkirkhamcommented, Oct 18, 2021

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.

<div id="app">
Hello world
<script>
</script>
</div>
2reactions
yogastamacommented, Apr 14, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found