#Install node working official Dagger Node module

1 messages · Page 1 of 1 (latest)

light horizon
#

In the attached image, you can see I am setting up source and base helper functions and attmpting to run the fmt-check command in my repo. However, whenever it goes to run it, I am getting the error in the second screenshot which seems like the install command from base didn't actually run a yarn install?

light horizon
#

Any chance this is already a known issue that has been reported as an issue on Github I can sub too?

shut garnet
#

What's your node dependency version?

light horizon
#

Sorry, not sure I follow the question. Like which version are you looking for specifically?

shut garnet
#

In dagger.json, you must have a dependency on "node". I'm asking for the full reference so I can inspect its source code.

light horizon
#
{
  "name": "motion-dagger",
  "sdk": "typescript",
  "dependencies": [
    {
      "name": "node",
      "source": "github.com/dagger/dagger/sdk/typescript/dev/node@fca9e788f6d605ef9d256beace4656c11d7f6fe5"
    }
  ],
  "source": "dagger",
  "engineVersion": "v0.10.1"
}

At the time I pulled this in, it was the most recent version

shut garnet
#

Can you add --debug in dagger --debug call?

light horizon
#

Yeah, Ive gotta get my repo back into this state. It'll be a few

shut garnet
light horizon
#

Im not sure what changed since I ran into this issue the other day, but it seems like it's running yarn install properly now... Im guessing that cache volume though would help with speed?

shut garnet
#

Yes, the problem is the name of the cache volume. If you use this node module in two different code bases, they'll share the same "node_modules" directory because the cache volume has such a generic name ("node-modules").

#

A cache volume for node modules needs to have a cache key that's very specific to a source code.

#

You wouldn't copy a node_modules directory from one project to another.

#

So if you use this dag.node() module in other places, that's no bueno 🙂 Could even be from following a tutorial using the same cache volume name. Better pass one yourself explicitly here.

light horizon
#

Makes sense. I think for now, I'll close out this thread. I've got about 1000 other questions, but those will come later when I get further along. Hah.

shut garnet
#

👍