Hello,
I wanted to test some things with server-side actions and automations, but there are some issues with Node.js core packages.
Some weeks ago, I posted some server-side code using the bcrypt library in this post, which still works fine if copied 1:1. The code imports the packages directly like:
import bcrypt from 'https://cdn.jsdelivr.net/npm/bcryptjs@3.0.2/+esm';
import isaac from 'https://cdn.jsdelivr.net/npm/isaac@0.0.5/+esm';
...
I then wanted to check out if it would still work the same using the new Packages tab:
So I added both packages there like this:
{
"dependencies": {
...
"bcrypt": "^3.0.2",
"isaac": "^0.0.5"
}
}
and used the imports like you would normally in a Node.js environment and as described in the docs:
import bcrypt from 'bcrypt';
import isaac from 'isaac';
but this throws an error:
I tried several things to manually import the path module, but nothing worked, so I assume this is either a deliberate decision by UI-Bakery or something not configured correct?
The docs state that
Libraries dependent on the
fs
andchild_process
modules are currently not supported.
So I thought the path module should have no issue. It’s also interesting to see that it works with the links of the libraries, but not the packages.