nx-tools icon indicating copy to clipboard operation
nx-tools copied to clipboard

nx-docker: can't import module after moving to swc

Open andersonba opened this issue 2 years ago • 2 comments

Hi! After upgrading to version 3.0.0, my custom executor that runs nx-docker internally was broken:

My code:

import { run } from '@nx-tools/nx-docker'

Error:

(0 , _nxDocker).run is not a function

Debugging:

import { run } from '@nx-tools/nx-docker'
console.log(run)
> { run: [AsyncFunction: run], default: [AsyncFunction: run] }

andersonba avatar Jun 17 '22 15:06 andersonba

Mmmm... Yeah something weird happening with swc 🤔 ... But I was able to run using

const { run } = require("@nx-tools/nx-docker");

run.run({...});

Try with that :D

gperdomor avatar Jun 19 '22 01:06 gperdomor

haha yeah, that was my hotfix.. however, I had to bypass the typescript

image

andersonba avatar Jun 19 '22 01:06 andersonba