Using node.js internal modules in custom app

Hello,

Is there currently any way to use node.js internal modules like Buffer (Buffer | Node.js v18.20.8 Documentation) in custom apps? When I try to require them in the code, I get the error that the module is not installed when trying to run the app.

Hi @chrism ,

you have to add it as a dependency in the manifest

and declare it in the js file

I hope this helps.

Hi @Michele,

Thanks for your idea, but what you suggested is using third-party npm modules that try to port the node.js internal modules for e.g. browser environments.
While this will probably work, the npm module (buffer - npm) hasn’t been updated in 5 years and is probably quite outdated. Some of the other internal modules don’t have a third-party module at all.