LambdaTest / lambdatest-cypress-cli

Allows Customers to run cypress test on Lambdatest Infrastructure
https://www.lambdatest.com/
MIT License
7 stars 24 forks source link

.npmrc file not included zip file sent to LambdaTest #61

Closed lezek closed 2 years ago

lezek commented 2 years ago

We are running into an issue installing a npm package from a private npm repository.

npm dependencies installation failed for the test

npm install from package.json failed, due to : npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.npmjs.org/@wafl%2fcypress_module - Not found
npm ERR! 404 
npm ERR! 404  '@wafl/cypress_module@1.0.2' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404 It was specified as a dependency of 'project'
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\ltuser\AppData\Roaming\npm-cache\_logs\2021-11-25T05_27_27_221Z-debug.log

I noticed in the project.zip file that gets uploaded to LambdaTest does not include the .npmrc file I have in the project directory. With some local testing adding the config option for dot files to the glob options includes the .npmrc file in the project.zip and the dependencies get installed correctly.

archive.js:

archive.glob('**/*', { cwd: process.cwd(), ignore: ignore_files, dot: true }, { prefix: "project/" })

This change would add basic support for private npm repos that are accessible on the internet.

japneetlambdatest commented 2 years ago

This issue is resolved in 2.1.9 version of the lambdatest-cypress-cli