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

503
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
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