Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

306
Vistas
Parcel - Unexpected token name «_28», expected punc «,»

I am using Color JavaScript Library in my Code, And I Am Using Parcel JS for bundling my Code.

When I Am Running Parcel JS For Development Using This Command -

  • parcel public/index.html

Everything Works Fine.

But When I Build My Code For Production Using This Command -

  • parcel build public/index.html --public-url ./ --target browser

I Get This Error -

> neusprite@0.0.1 build
> parcel build public/index.html --public-url ./ --target browser

🚨  /home/aditya/Documents/Codes/NeuSprite/node_modules/color/index.js: Unexpected token name «_28», expected punc «,»
    at Z.get (/home/aditya/Documents/Codes/NeuSprite/node_modules/terser/dist/bundle.min.js:1:525)
    at Object.errorToJson (/home/aditya/Documents/Codes/NeuSprite/node_modules/@parcel/utils/src/errorUtils.js:9:20)
    at Pipeline.process (/home/aditya/Documents/Codes/NeuSprite/node_modules/parcel-bundler/src/Pipeline.js:29:26)
    at async Object.run (/home/aditya/Documents/Codes/NeuSprite/node_modules/parcel-bundler/src/worker.js:15:12)
    at async Child.handleRequest (/home/aditya/Documents/Codes/NeuSprite/node_modules/@parcel/workers/src/child.js:60:26)

One thing to note is that when i use this following option --no-minify like this parcel build public/index.html --public-url ./ --target browser --no-minify it Just Works Fine.

On StackoverFlow I Found this Answer

UglifyJs does not support ES6. The error is very likely the method shorthand syntax.

But On The Parcel JS Documentation They Have Mentioned that they Use Terser

Parcel uses terser to minify JavaScript, cssnano for CSS, htmlnano for HTML, and svgo for SVG. If needed, you can configure these tools using a .terserrc, .cssnanorc, .htmlnanorc, or svgo.config.json config file. See the docs for JavaScript, CSS, HTML, and SVG for more details.

And Terser Clearly Mentions It is Suitable For ES6+ On Their GitHub Page.

A JavaScript parser and mangler/compressor toolkit for ES6+.

Then Why I Am I getting This Error?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda