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.

Unexpected token: name (Dom7)

See original GitHub issue
  • Laravel Mix Version: 1.4.5
  • Node Version: v8.6.0
  • NPM Version: 5.4.2
  • OS: macOS Sierra

I just updated laravel-mix to the latest version and when I run npm run production I now get the following error:

js/dist/app.js from UglifyJs
Unexpected token: name (Dom7) [./node_modules/dom7/dist/dom7.modular.js:14,0][js/dist/app.js:24688,6]

It works fine with npm run watch - just when I try to compile for production. Looks like dom7 package related?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

11reactions
sebastiansulinskicommented, Oct 13, 2017

For me it was nolimits4web/Swiper that was causing this problem - I’ve downgraded to v3.4.2 and the problem went away.

0reactions
sebastiansulinskicommented, Apr 4, 2019

When you check the package codebase you’ll see it is now using modules - hence needs es6 compiling.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected token: name «Dom7», expected: punc «;» - GitHub
when I build the project, the error is appeard. I only use the component with the normal config.
Read more >
Cannot fix "Unexpected token name «i», expected punc «;»"
According to forums, the problem is caused because UglifyJs does not support ES6 so I tried to solve it with these links: this...
Read more >
Bountysource
Unexpected token : name (Dom7)
Read more >
Unexpected token: name (Dom7)_心若向阳无谓悲伤的博客
Unexpected token : name (Dom7) ... 今天在运行vue项目的时候,报了这个异常,异常引起的原因是由于在vue项目中使用了4.0以上版本的swiper,Dom7是swiper4.0+ ...
Read more >
resolve - CodeAntenna
swiper4以上在ios11以下报错: Unexpected token: name (Dom7) [./node_modules/dom7/dist/dom7.modular.js:16,0] ...
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