Need solution in function node using library?

Hi team,

I am running a node-svn-ultimate library in the function node.
I am running n8n using docker even I use -e NODE_FUNCTION_ALLOW_EXTERNAL= node-svn-ultimate.

I am facing only an error in the function node.
here my code is,

let resStatus, resData;
function generate() {
    return new Promise((resolve, reject) => {
        svnUltimate.commands.info(
            repoUrl,
            config,
            function (err, data) {
                if (err) {
                    resStatus = "false";
                    resData = null;
                    resolve(resData)
                } else {
                    resStatus = "true";
                    resData = data;
                    resolve(resData)
                }
            }
        );
    })
}
async function init() {
    return await generate();
}
const res = await init();

I am getting the error like,

{ killed: false, code: 127, signal: null, cmd: svn info myUrl --xml myusername -- mypassword }

Can anyone tell me how to resolve this?

Thanks.

1 Like

Looks like you’re missing username and password. Please check carefully.

No,

In config, I have a username and password. but it won’t work. still waiting for a solutioin.

Thanks for the Reply @mcnaveen.

Have a nice day.

Have you tried the same package outside the n8n?
I mean in plain nodejs code?

(Please do, Because the package might be outdated and it’s no longer maintained)

or

Please share your usecase, to try the approach with different available nodes.

Yes, @mcnaveen,

I tried with a normal nodejs program. works fine.

I am facing an issue that only running n8n with docker.

Thanks,

1 Like

Hey @rajesh-kumar, I am not familiar with this very npm module but an error code of 127 suggests a command was not found: https://www.baeldung.com/linux/status-codes#command-not-found

It seems this npm module simply calls the svn command? Chances are this command is not available in your docker container. Could you try installing the subversion package and see if that works for you (by running apk add subversion inside your Docker container if you’re using an Alpine Linux-based image)?

Yes, @MutedJam.

Now its works. I tried the same as.

Thanks for the time @MutedJam.

1 Like

Sweet, glad to hear. Many thanks for confirming!

1 Like