Jump to content

Node.js API in a Visual Components Project

Recommended Posts


I want to write an app in SMS an convert it to a executable with Nativefier. For this I created a Visual Components Project. Now I want to read a file form the filesystem. I tried it with NodeFsAPI.writeFileSync, but this throws an exception "require is not defined".

It is clear that it won't work in the browser, but the behavior is the same when I created an .exe with  Nativefier.

Is there a way to use the NodeJS APIs this way?

Thank You

Link to post
Share on other sites
  • Moderators

You're pushing the boundaries here and probably too far if you want to write directly from a client.

If you only need to read a file you can do that in a couple of ways, see this post

Otherwise also have a look at SmartCL.Require.pas, this article, this post and this post and even https://nwjs.io/ to see if that helps in any way.

Keep us posted


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...