Haalp! Trying Windmill for the first time and failing!
A dev with 10+ years of Node/TS experience, but still can't figure it out!
Did
wmill sync push --yes
Run from the UI:
error: Cannot find package 'windmill-client' from '/tmp/bun/main.ts'Script is this: Tried without
nobundling
, it also fails but in a different way.23 Replies
Oddly enough, if I go into edit mode, and press "Test" there, without any changes, it works.
Works both ways with and without "nobundling".
Ok, after I "deployed" from the UI, and then did a sync down. I see that it updated
slack_list_channels.script.lock
file. How is it supposed to be updated when developing on local?hi, did you follow:
https://www.windmill.dev/docs/advanced/cli/script#creating-a-new-script
Scripts | Windmill
Listing scripts
there is also a way to regenerate metadata:
wmill script generate-metadata
using the cliYes, I followed that link
that command should have locally generated the script.lock file
Just ran:
And then pushed, and it actually broke a working version 😂
It's interesting, because when I again edit in the browser, and deploy and pull down, it creates a huge diff, where a bunch of deps get deleted and replaced.
In the
slack_list_channels.script.lock
fileThat's just part of it

The green is what the web UI did, and the red is the generate-metadata version
ok that is weird, let me try to reproduce
can you send me the imports of the script? I guess from the green part its only slack and windmill client?
thanks!
thanks to you! 🙂
what cli version are you on
Version: 1.508.0
I just setup everything today, and opened an account today, so should be on latest everything, in theory
❯ bun --version
1.2.18
ok, yeah sorry about that rough start I'll investigate and get back to you about this
ok strange:
I tried the following in a clean new folder:
then edit f/test/hello2.ts
then
which results in this
so far I think we're aligned
then you pushed it and it added bunch of stuff to your lockfile right?
did you maybe at one point import the
windmill-cli
in your script ?
anyway, would be good if you could try reproduce those steps above with my dummy script just to be sure not something else is going onthen you pushed it and it added bunch of stuff to your lockfile right?I pushed it Then deployed it Then sync'ed back down >did you maybe at one point import the windmill-cli in your script ? no, but i think i did install it into the project package.json
So, following your steps, after I generate the meta data, the lock file is like this:
Any ideas?
So yeah, looks like you have locally installed the cli which explains why when you click deploy in the UI (this will trigger the building of the lock file) it will generate a conflicting lock file. But your script should still run. Are you still getting errors?
Ok but if I don’t install the CLI how am I supposed to use it?
it's ok to install globally (npm i -g) but it seems it ended up in your local scripts lock file?
if you create a fully new script from scratch (new clean folder that you're syncing with the cli) you shouldn't get the cli dependency in your local lock file
I don't like installing globally, I think it's an anti-pattern, and it's also not stable, as I have many Node.js versions on my computer (managed by nvm) so you never know where it's going to be installed.
Is there no way to install the CLI in the project?
And I am still not understanding how this CLI affects the remote scripts. How does it conflict? Shouldn't the script only use locks that are part of the script? Why does it even pay attention to the root lock file?
Hi, you have no reason to have multiple versions of the windmill-cli installed, it's just a binary in this case so you should install it globally or use it with npx
the CLI has many advanced features, one of them is to make the package.json affect the lockfile generation of all scripts in the same folder hierarchy
if you do not want that feature, do not have any package.json in that folder