News for hackers. Stuff that matters.
Re:Do not use NPM 5.7 by dvlsg on Thursday February 22, 2018 @03:10PM (#16440938)
Unless you have native modules and are building on a machine that is different (windows, etc) from your deployment target.

And sure, there are ways around that too, but it's not always as simple as copying and pasting the dependencies.

Re:Do not use NPM 5.7 by zeveb on Thursday March 01, 2018 @10:44AM (#16492830)
> Unless you have native modules and are building on a machine that is different (windows, etc) from your deployment target.

I really don't understand why people do this. If you deploy on Linux, develop on Linux (and if you deploy on Debian, develop on Debian); if you deploy on Windows, develop on Windows (and you have my sympathy). It just makes all of life so much easier.

As a side note, I'd argue very strongly against picking the deployment environment based on the development environment: choose the best deployment environment, and then specify that developers use it to develop. IMHO there's no deployment environment today which is unsuitable for development (with the exception of Windows, ba-dump-ts), and production is what makes the money and keeps the customers happy.

Re:Do not use NPM 5.7 by thom_nic on Monday February 26, 2018 @11:19AM (#16466381)
This is true. Thankfully node-pre-gyp helps here because you can build the native modules once for each target arch/platform. I actually have a node app that uses several native modules, and `npm install` it for an ARM target from an x86 host. It also works cross-OS (e.g. build on MacOS for linux.) The key flags are `npm install --production --target_arch=arm --target_platform=linux`.