-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
writeFile not available at compile time when using the JS backend #3124
Comments
This issue can be worked around with staticExec:
|
Could this be because you called your file "writeFile.nim"? |
No. See my above example. It works with the c back end. I named it writeFile.nim because that is what I was having issues with. But again, now with a different file name, same results.
|
Still an issue |
Very new to Nim, but I seem to experience a variant of this still: nim js -d:release -o:"a.js" "file.nim"
> undeclared identifier: 'open' The relevant code in my file is: var outputFile = open(targetFile, fmWrite) Compilation to C works fine. |
EDIT: Nevermind, I misread and missed the compile time thing (old comment #7505 |
At compile time you are not running on node |
@andreaferretti ah, i've completely missed that part, you're right. very bizarre |
Works for me now |
in static: blocks or {.compileTime.} functions writeFile is not available with the JS backend.
The text was updated successfully, but these errors were encountered: