How could I make the raw command run just as the npm alias does?
I have the following inside my package.json:
"scripts": {
"cypress:test": "cypress-ntlm run --config-file tests/cypress-config.json"
}
And the command npm run cypress:test executes just fine.
But if I try to run the raw command:
cypress-ntlm run --config-file tests/cypress-config.json
, then I am getting the error: bash: cypress-ntlm: command not found.
I want to be able to run raw command as well as the npm aliased command.
Does the npm alias has some dependencies specific only for the alias? E.g. the cypress-ntlm in my case.
CodePudding user response:
Try running your command prefixed by npx or npm exec. I'm not an npm expert by any means, but in my mind I've always equated npm run {script} as being almost equivalent to npx {script contents}. cypress-ntlm suggests in their docs running npx cypress-ntlm {options}.
