Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

258
Visualizações
SpecReporter is not a constructor error when running protractor using angular-cli

When I try to run ng e2e or direct protractor command I get this error :

[14:39:00] I/update - chromedriver: chromedriver_2.28 up to date
[14:39:04] I/launcher - Running 1 instances of WebDriver
[14:39:04] I/direct - Using ChromeDriver directly...
[14:39:44] E/launcher - Error: TypeError: SpecReporter is not a constructor
    at onPrepare (/home/younes/repo/cip_front/protractor.conf.js:30:34)
    at q_1.Promise (/home/younes/repo/cip_front/node_modules/protractor/lib/util.ts:48:39)
    at Function.promise (/home/younes/repo/cip_front/node_modules/q/q.js:682:9)
    at Object.runFilenameOrFn_ (/home/younes/repo/cip_front/node_modules/protractor/lib/util.ts:39:10)
    at plugins_.onPrepare.then (/home/younes/repo/cip_front/node_modules/protractor/lib/runner.ts:103:21)
    at _fulfilled (/home/younes/repo/cip_front/node_modules/q/q.js:834:54)
    at self.promiseDispatch.done (/home/younes/repo/cip_front/node_modules/q/q.js:863:30)
    at Promise.promise.promiseDispatch (/home/younes/repo/cip_front/node_modules/q/q.js:796:13)
    at /home/younes/repo/cip_front/node_modules/q/q.js:556:49
    at runSingle (/home/younes/repo/cip_front/node_modules/q/q.js:137:13)
    at flush (/home/younes/repo/cip_front/node_modules/q/q.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
[14:39:44] E/launcher - Process exited with error code 100
about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

this is because of a breaking change in Jasmine. Change your protractor config file to have:

var SpecReporter = require('jasmine-spec-reporter').SpecReporter;

instead of:

var SpecReporter = require('jasmine-spec-reporter');
about 4 years ago · Santiago Trujillo Relatório

0

You need to do like this following:

const SpecReporter = require('jasmine-spec-reporter').SpecReporter;

jasmine.getEnv().addReporter(new SpecReporter());
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda