Running a testnode with the TS SDK in a nodejs environment

Hey guys i dont know if this is the correct environment but we are working on a new protocol that we are going to release and we need our own fuel node. I tried spinning up my own test node and put it inside a VM (in a nodejs environment with the TS sdk) with these exact configurations:

import { launchTestNode } from "@fuel-ts/contract/test-utils"

const run = async () => {
  using launchedWithDefaultConfig = await launchTestNode()
  const { provider } = launchedWithDefaultConfig
  const { name } = await provider.fetchChain()
  console.log("Chain Name:", name)
}

run()

however when i run this i get the following error:

npx ts-node testNode/testNode.ts
using deprecated parameters for the initialization function; pass a single object instead
No PID available for the child process, unable to kill launched node

Am i doing something wrong with my imports maybe? I tried a lot of things already but nothing seems to solve it.

Hey @paulman176 :wave:

How are you setting up your VM? If you can share as much information as possible I can try an replicate this issue.

I understand these are you current versions:

  • node 22.13.0
  • fuels ^0.98.0
  • ts-node ^10.9.2
1 Like