#What's your current package.json?

1 messages · Page 1 of 1 (latest)

wind skiff
#
{
  "type": "module",
  "dependencies": {
    "@dagger.io/dagger": "./sdk",
    "@datadog/datadog-api-client": "1.23.0",
    "@infisical/sdk": "2.2.3",
    "@octokit/rest": "^20.1.1",
    "luxon": "3.4.4",
    "octokit": "4.0.2",
    "typescript": "5.4"
  },
  "devDependencies": {
    "@types/luxon": "3.4.2",
    "bun-types": "^1.1.10"
  },
  "scripts": {
    "build": "tsc --noEmit",
    "develop": "dagger develop --sdk=typescript && yarn install",
    "remote": "infisical run --env=internal -- bun scripts/ci.ts",
    "local": "infisical run --silent --env=internal -- dagger call --auth=env:INFISICAL_DAGGER_TOKEN",
    "local:plain": "infisical run --silent --env=internal -- dagger call --auth=env:INFISICAL_DAGGER_TOKEN --progress=plain"
  },
  "packageManager": "yarn@4.2.2",
  "resolutions": {
    "lru-cache": "<10.4.0"
  }
}
unborn anchor
#

Oh but you're using yarn v4.2.2

#

That's why

#

I still need to get the fix to use the user's pkg manager with the specific version

wind skiff
#

that doesn't matter since you aren't reading it anyway

unborn anchor
#

Yes but I want to add the feature to read it

wind skiff
#

it also complains about having the dagger dependency in both dependencies and devDependencies

unborn anchor
#

So I can use corepack if package manager is set to pnpm or yarn

wind skiff
#

so it doesn't look like thats the package.json that its reading

unborn anchor
#

I don't underrstand why it says so, your dagger deps is in dependencies

#

do you have a package.json somewhere else?

wind skiff
#

nope

unborn anchor
#

And what's your dagger version?

wind skiff
#

.. originally it was in devDependencies with file:sdk. Maybe its reading a cached copy ?

unborn anchor
#

Hm maybe, depends of your dagger version

#

I changed that some times ago

wind skiff
#

I'm on 0.11.9

#

Ya , I know it was changed up a while ago

unborn anchor
#

Hmm 0.11.9 set dagger in dependencies

#

Maybe restart from a clean state?

#

Are you sure you're engine has this version?

#

Try init a project somewhere else just to verify?

wind skiff
#

I've deleted my engine a couple times

unborn anchor
#

That's super strange

#

Do you have a cloud trace?

wind skiff
#

a newly inited project works

unborn anchor
#

So I don't understand

wind skiff
#

It looks like something was pulled from cache

unborn anchor
#

Could you try to clean your cache?

wind skiff
#

how do I do that ?

unborn anchor
#

clean your cache volumes

#

container volume rm xxx

#

I think

wind skiff
#

is there a way to tell which ones were used by dagger ?

unborn anchor
#

Hmm not afaik

wind skiff
#

ran docker volume prune... same issue though

unborn anchor
#

Can you do a docker ps?

wind skiff
#
docker ps
CONTAINER ID   IMAGE                               COMMAND                  CREATED          STATUS          PORTS                                            NAMES
4ba0c7fe0bf4   registry.dagger.io/engine:v0.11.9   "dagger-entrypoint.s…"   51 seconds ago   Up 51 seconds                                                    dagger-engine-ceb38152f96f1298
e4ef380fd056   harness/gitness                     "/app/gitness server"    2 months ago     Up 26 hours     3000-3001/tcp, 0.0.0.0:7100->7100/tcp            gitness
2b67307a5cb5   postgres:16.1                       "docker-entrypoint.s…"   5 months ago     Up 26 hours     0.0.0.0:5432->5432/tcp                           motion-postgres-1
62737eba8e0d   slamdev/temporalite:0.3.0           "temporalite start -…"   7 months ago     Up 26 hours     0.0.0.0:7233->7233/tcp, 0.0.0.0:8233->8233/tcp   temporal
d550096108da   redis:6                             "docker-entrypoint.s…"   7 months ago     Up 26 hours     0.0.0.0:6379->6379/tcp                           redis
unborn anchor
#

Yeah okay, all versions are correct..

#

what's your source in your dagger.json

wind skiff
#
"source": "dagger",
unborn anchor
#

Okay so that's even more confusing.. you did everything good

#

I've never hit this issue

wind skiff
#

fun

#

same thing happens with a fresh checkout (into a different directory)

unborn anchor
#

That's super weird :/

#

But it works with a fresh init right?

wind skiff
#

fresh init is good

#

I just tried removing the DAGGER_CLOUD_TOKEN in case that was causing issues, but I got the same thing

unborn anchor
#

Hmm

#

So it's related to something in your repo :/

#

Do you import an external module?

wind skiff
#
  "dependencies": [
    {
      "name": "node",
      "source": "github.com/dagger/dagger/sdk/typescript/dev/node@9e59bae142f64975b7c9ad851e6bd4901d43513a"
    },
    {
      "name": "notify",
      "source": "github.com/gerhard/daggerverse/notify@4ad0f0317fd57c41001b48c5a9a3a49d39e43210"
    }
  ],
#

that node module seems to be the issue

unborn anchor
#

Ohhh yep I think soo

#

Yep that's this

#

Ok I need to update them

wind skiff
#

.. now I just need to figure out where I'm using that

#

if I remove it, I just get a generic

Error: Unsupported type any

with no indication of where it saw that

unborn anchor
#

Check dag.node?

wind skiff
#

doesn't look like I'm using that anywhere

unborn anchor
#

Hmm

#

And notify?

wind skiff
#

notify seems fine

#

I am running into another issue though

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'graphql-tag' imported from /src/dagger/sdk/index.ts
    at packageResolve (node:internal/modules/esm/resolve:853:9)
    at moduleResolve (node:internal/modules/esm/resolve:910:20)
    at defaultResolve (node:internal/modules/esm/resolve:1130:11)
    at nextResolve (node:internal/modules/esm/hooks:749:28)
    at resolve (file:///usr/local/lib/node_modules/tsx/dist/esm/index.mjs?1720542440961:2:3893)
    at nextResolve (node:internal/modules/esm/hooks:749:28)
    at Hooks.resolve (node:internal/modules/esm/hooks:237:30)
    at handleMessage (node:internal/modules/esm/worker:199:24)
    at Immediate.checkForMessages (node:internal/modules/esm/worker:141:28)
#

I can get around this one by adding a yarn.lock in the sdk folder and running yarn install on it

unborn anchor
#

Oh I know this one

#

Will be fixed in v0.12, by using type module

wind skiff
#

that one seems to be caused by the fact that the sdk is using pnp (well a likely suspect anyway)

unborn anchor
#

What's that?

wind skiff
#

pnp is the default linker for yarn

wind skiff
unborn anchor
#

your current moudle

wind skiff
#

it already has thta

unborn anchor
#

Hmm

wind skiff
#

Is there a way to debug the introspector locally ?
It seems like changes that I make to the sdk folder don't get picked up

unborn anchor
#

You'll need to update dagger code then ./hack/dev and use this one

#

In the dagger repo

wind skiff
#

It would be great if you could report where the code-gen was failing for things like this

unborn anchor
#

I already return the traces :/

wind skiff
#

the trace is for the sdk code though.
If you have the Node / Symbol, then you should be able to show where it is coming from

unborn anchor
#

Hmmm I see

#

I'll see if I can make that happened