NodeJS app installation test

30 views
Skip to first unread message

Alan Joseph

unread,
Sep 18, 2018, 10:29:07 PM9/18/18
to nodejs
Hello all, 

Please let me know if you know about any testing tool that I can use for testing the installation of my Node app in different NodeJS versions and NPM versions.

And help would be appreciated.

Thank you
Alan

Paolo Nicorelli

unread,
Sep 19, 2018, 7:09:00 PM9/19/18
to nod...@googlegroups.com
On Wed, 19 Sep 2018 at 04:28, Alan Joseph <alanjo...@gmail.com> wrote:
Please let me know if you know about any testing tool that I can use for testing the installation of my Node app in different NodeJS versions and NPM versions.


You can use a version management.

hope it helps
cheers

Mikkel Wilson

unread,
Sep 19, 2018, 7:09:04 PM9/19/18
to nodejs
You can use 'n' (`npm install -g n`) for node versions, but switching npm versions may be more difficult. If you're trying to run this as part of a CI/CD pipeline and you can run on a machine that supports Docker, you can use `docker run node:$VERSION` to select which version to use. The list of available versions is here: https://hub.docker.com/_/node/ . For example: `docker run --rm --volume ./:/data node:6.14.4-jessie "npm install"`

This will mount your current directory to /data in the container running Debian Jessie with node version 6.14.4 and run `npm install`. (the --rm flag will remove the container when it's exited; good for CI.)

Mikkel
Reply all
Reply to author
Forward
0 new messages