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

496
Visualizações
How to install/use a cypress plugin without using npm install

I'm trying to install/use this cypress plugin https://github.com/bjowes/cypress-ntlm-auth for my automation tests so I can login to an application that uses ntlm authenticator, but I cannot use npm install --save-dev cypress-ntlm-auth command cause of corporate security policies. I've downloaded the zip repo release of this plugin and also have cypress installed, but I don't know the exact steps to do this without npm install.

I've tried adding this in the cypress/plugins/index.js file:

const ntlmAuth = require('cypress-ntlm-auth-3.2.5/test/e2e/cypress/plugins/index.ts');
module.exports = (on, config) => {
  config = ntlmAuth.initNtlmAuth(config);
  return config;
}

and also added this is cypress/support/index.js file:

import "cypress-ntlm-auth-master/src/commands"

but I have the following error while trying to open cypress: Error: Cannot find module 'cypress-ntlm-auth-3.2.5/test/e2e/cypress/plugins/index.ts' (the index.ts file is in the mentioned location)

I think I might be missing some installing/configuration steps. Can someone help?

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

Assuming you unzipped to node_modules, this is the difference between an npm install (left) and a zip (right).

enter image description here

Try hacking this

  • rename the unzipped src to dist

  • add http-mitm-proxy

    #!/bin/sh
    basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
    
    case 'uname' in
      *CYGWIN*) basedir=`cygpath -w "$basedir"`;;
    esac
    
    if [ -x "$basedir/node" ]; then
      "$basedir/node"  "$basedir/../../../http-mitm-proxy/bin/mitm-proxy.js" "$@"
      ret=$?
    else 
      node  "$basedir/../../../http-mitm-proxy/bin/mitm-proxy.js" "$@"
      ret=$?
    fi
    exit $ret
    
  • add http-mitm-proxy.cmd

    @IF EXIST "%~dp0\node.exe" (
      "%~dp0\node.exe"  "%~dp0\..\..\..\http-mitm-proxy\bin\mitm-proxy.js" %*
    ) ELSE (
      @SETLOCAL
      @SET PATHEXT=%PATHEXT:;.JS;=;%
      node  "%~dp0\..\..\..\http-mitm-proxy\bin\mitm-proxy.js" %*
    )
    

These two files are also found in /node_modules/.bin with the file names cypress-ntlm and cypress-ntlm.cmd, which may be the critical bit, so copy them there as well.

about 4 years ago · Juan Pablo Isaza Relatório

0

I think using yarn might help : yarn add cypress-ntlm-auth
Install yarn by : npm install yarn -g

about 4 years ago · Juan Pablo Isaza 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