2

Context:

I am developing a node app for Windows 2016 server. The machine I develop on runs Ubuntu 18.04.

I would like to make use of the package node-windows, however when I try to install it, I get the following error:

$ npm i node-windows
npm ERR! code EBADPLATFORM
npm ERR! notsup Unsupported platform for node-windows@1.0.0-beta.1: wanted {"os":"win32","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! notsup Valid OS:    win32
npm ERR! notsup Valid Arch:  any
npm ERR! notsup Actual OS:   linux
npm ERR! notsup Actual Arch: x64

Question:

While it makes sense to me that I will not be able to run the app on Linux, I am looking for a way that allows me to write and hopefully build the code on Linux. How can I achieve this?

Bastian Stein
  • 2,147
  • 1
  • 13
  • 28
  • 1
    Dockerize your app, or install virtual machine – glinda93 Jul 17 '20 at 15:05
  • I like the idea of having the app run in a docker container, however per https://stackoverflow.com/questions/42158596/can-windows-containers-be-hosted-on-linux , it is not possible to run windows docker images on linux. I would like to avoid writing code within a VM if possible. – Bastian Stein Jul 17 '20 at 15:11

0 Answers0