0

I have tried to compile nim file to generate javascript code but I got this error: Error: OS module not ported to your operating system!

using this command: nim js -d:nodejs -r myFile.nim. The problem is related to : import os in this file. Is there any solution?

sebasaenz
  • 1,917
  • 2
  • 20
  • 25
EFREV123
  • 33
  • 4
  • 1
    The problem is that the OS module is available only when compiling to C/C++. What are the particular functions, which you want to use? – zah Jan 08 '17 at 21:12
  • I want to compile to js this script : https://github.com/nim-lang/Nim/blob/devel/tests/benchmarks/quicksort.nim – EFREV123 Jan 09 '17 at 19:18
  • 1
    You can remove the `import os` line. It doesn't seem to be used in the rest of the code. – zah Jan 09 '17 at 20:41

0 Answers0