Getting started with SaaS Connectivity

Description

SaaS Connectivity is a cloud based connector runtime that makes developing and deploying web service connectors easier than ever. The SaaS Connectivity framework allows an easy way to connect to cloud-based sources in a truly SaaS architecture, without the need to rely on a VA. Phil will walk us through how to get started and talk about some of the benefits like debugging and testing locally, no rules needed, and more.

1 Like

Hello Phil. I am very new to Sailpoint so I found your Saas Connectivity presentation to be excellent. Looking forward to implementing this solution at my work. However i am getting an error when I run the “npm run dev” command. any advice work be very helpful.

> cross-env NODE_OPTIONS=--enable-source-maps spcx run dist/index.js

node:internal/child_process:421
    throw new ErrnoException(err, 'spawn');
    ^

Error: spawn EINVAL
    at ChildProcess.spawn (node:internal/child_process:421:11)
    at spawn (node:child_process:760:9)
    at spawnTsc (C:\VSCode\Samples\ConnPrj3\node_modules\@sailpoint\connector-sdk\bin\spcx.ts:73:20)
    at runDev (C:\VSCode\Samples\ConnPrj3\node_modules\@sailpoint\connector-sdk\bin\spcx.ts:83:2)
    at Object.<anonymous> (C:\VSCode\Samples\ConnPrj3\node_modules\@sailpoint\connector-sdk\bin\spcx.ts:32:2)
    at Module._compile (node:internal/modules/cjs/loader:1467:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1551:10)
    at Module.load (node:internal/modules/cjs/loader:1282:32)
    at Module._load (node:internal/modules/cjs/loader:1098:12)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14) {
  errno: -4071,
  code: 'EINVAL',
  syscall: 'spawn'
}

I appreciate any help / guidance you can provide
Thanks
-Martin Valenzuela

Hi Martin,

I’m not sure why you are having this error, but here is a workaround that should work for you:

  1. Open the node_modules/@sailpoint/connector-sdk/dist/bin/spcx.js file and look for the spawnTsc(); command on or around line 68 and comment it out.
  2. in a command window in the same directory as your connector, run the command: tsc.cmd --inlineSourceMap true --sourceMap false --watch
  3. Now run the npm run debug command in a new command window and all should work as expected.
  4. When you are done debugging, you can close both command windows you had created in the two prior steps.

In some ways this is a better way to do the development like this anyway as you can see both processes running at the same time.

1 Like

Hi Martin,

I see that @philip-ellis Philip provided some feedback already, I have been facing the same issue and I made some adjustments to the code (spcx.js) on line 60

        const tsc = (0, child_process_1.spawn)(/^win/.test(process.platform) ? 'tsc.cmd' : 'tsc', ['--inlineSourcemap', 'true', '--sourceMap', 'false', '--watch'])
            .once('spawn', () => {
            tsc.stdout.on('data', (data) => console.log(`tsc: ${data}`));
            tsc.stderr.on('data', (data) => console.error(`tsc: ${data}`));
        })
            .once('error', (ignored) => { });
        return tsc;
    };
    spawnTsc();

After updating line : 60

const spawnTsc = () => {
        const tsc = (0, child_process_1.spawn)(/^win/.test(process.platform) ? 'tsc' : 'tsc', ['--inlineSourcemap', 'true', '--sourceMap', 'false', '--watch'])
            .once('spawn', () => {
            tsc.stdout.on('data', (data) => console.log(`tsc: ${data}`));
            tsc.stderr.on('data', (data) => console.error(`tsc: ${data}`));
        })
            .once('error', (ignored) => { });
        return tsc;
    };
    spawnTsc();

I have changed tsc.cmd to tsc, alternatively you can add { shell: true } after the command and try it out. See some Nodejs release notes: Node.js — Wednesday, April 10, 2024 Security Releases

1 Like