1
resposta

Erro GULP

Ao tentar usar alguns dos comando que o professor pede no gulp com por exemplo o "minify-html" ou o "useref" recebo o seguinte erro no terminal

PS C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I> gulp useref
[07:37:32] Using gulpfile ~\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\gulpfile.js
[07:37:32] Starting 'useref'...

events.js:352
      throw er; // Unhandled 'error' event
      ^
PluginError
    at new JS_Parse_Error (eval at <anonymous> (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:1534:18)
    at js_error (eval at <anonymous> (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:1542:11)
    at croak (eval at <anonymous> (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2089:9)
    at token_error (eval at <anonymous> (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2097:9)        
    at unexpected (eval at <anonymous> (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2103:9)
    at expr_atom (eval at <anonymous> (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2618:13)
    at maybe_unary (eval at <anonymous> (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2792:19)       
    at expr_ops (eval at <anonymous> (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2827:24)
    at maybe_conditional (eval at <anonymous> (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2832:20) 
    at maybe_assign (eval at <anonymous> (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\uglify-js\tools\node.js:28:1), <anonymous>:2856:20)      
Emitted 'error' event on Duplexify instance at:
    at Duplexify.onerror (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\duplexify\node_modules\readable-stream\lib\_stream_readable.js:640:52)
    at Duplexify.emit (events.js:375:28)
    at Duplexify._destroy (C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\duplexify\index.js:191:15)
    at C:\Users\Designer\Desktop\Alura\Alura-curso-atual\Alura-curso-atual\Performance Web I\node_modules\duplexify\index.js:182:10
    at processTicksAndRejections (internal/process/task_queues.js:77:11) {
  message: 'C:\\Users\\Designer\\Desktop\\Alura\\Alura-curso-atual\\Alura-curso-atual\\Performance Web I\\site\\assets\\js\\script.js: SyntaxError: Unexpected token: punc ())',
  fileName: 'C:\\Users\\Designer\\Desktop\\Alura\\Alura-curso-atual\\Alura-curso-atual\\Performance Web I\\site\\assets\\js\\script.js',
  lineNumber: 4,
  showStack: false,
  showProperties: true,
  plugin: 'gulp-uglify'

e o arquivo final acaba todo quebrado e não funcionando.

1 resposta

Oi Diego, tudo bem?

Desculpe a demora para responder!

Quando você utiliza o comando gulp minify ou gulp minify-html você recebe esse mesmo erro ou algum outro?

Consegue me retornar aqui com o erro? Fico no aguardo, abraços!