Our NodeJS application should run on Linux and Windows servers. We have the following dilemma:
- If we run
npm ias our CI Build then we sometimes get errors due to differences between the developers laptop's NPM and the build server. - However, if we run
npm cithen the build will presumably be locked to the platform of the developers laptop (Windows) and not work on a linux build server.
Maybe our assumptions are incorrect:
- Do we need to build 2 versions of our app: one for each platform?
- Does
npm cilock us into the platform of the developer's machine throughpackage-lock.json?
Examples of builds working on developers Windows laptops and on Windows servers but not on a Linux server are apps like strapi or packages like sharp which compile stuff for the platform (.dlls for windows, godknowswhat for linux).