Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it doesnt start working (Windows) #43

Open
yjgoh28 opened this issue Jun 23, 2024 · 22 comments
Open

it doesnt start working (Windows) #43

yjgoh28 opened this issue Jun 23, 2024 · 22 comments

Comments

@yjgoh28
Copy link

yjgoh28 commented Jun 23, 2024

i installed the npm package, but when i try to run micro-agent on my cmd. Nothing appears, i even set an openai-api-key already.

image

@Uffynn
Copy link

Uffynn commented Jun 25, 2024

did you check if you nodejs is updated to the latest version?

@Sudococommunity
Copy link

Same problem

@tpaulshippy
Copy link
Contributor

What OS? The screenshot looks like windows. Anyone have this working on windows?

@Sudococommunity
Copy link

we are running this windows bro

@tpaulshippy
Copy link
Contributor

Could be the issue.

@Uffynn
Copy link

Uffynn commented Jun 26, 2024

Try to get Linux or MacOS. Windblows in extremely bad in every single sense.

@tpaulshippy
Copy link
Contributor

I don't have a Windows box handy to try to help you out here. I did look at the packaging library used (pkgroll) and it is sponsored by Microsoft so you would think it would work. Perhaps it has to be built on Windows? Have you tried using WSL (Linux on Windows)?

@mdsitton
Copy link

I also cannot get it running under windows, so probably good idea to rename this issue to something more descriptive.

@mdsitton
Copy link

Additionally i have a few other things not being shown in the original post here:

PS H:\testdir> micro-agent
(node:32412) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)


|
—  Stopping.



PS H:\testdir> micro-agent update

Running: npm update -g @builder.io/micro-agent

(node:39352) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
npm error code 1
npm error path C:\Users\matth\AppData\Local\pnpm\store\v3\tmp\_tmp_28416_cb68f52debc1cc36bd616b3bfe40a5e4
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c husky install
npm error 'husky' is not recognized as an internal or external command,
npm error operable program or batch file.
npm error A complete log of this run can be found in: C:\Users\matth\AppData\Local\npm-cache\_logs\2024-06-27T20_07_37_234Z-debug-0.log

@LucasOscarSimon
Copy link

I don't have a Windows box handy to try to help you out here. I did look at the packaging library used (pkgroll) and it is sponsored by Microsoft so you would think it would work. Perhaps it has to be built on Windows? Have you tried using WSL (Linux on Windows)?

I tried with docker over wsl 2 and worked, but it's a little strange because I asked for a python app and wrote a TypeScript one.
micro-agent

@LucasOscarSimon
Copy link

I tried to keep it as simple as possible just for testing purposes and asked it to write a python app that get real-time exchange rates from an API and allow users to convert between different currencies. As you can see in the above image it did what I asked for but it wrote the code in TypeScript. Is there anything that I'm missing here?
Thanks for your help guys and great idea by the way!

@tpaulshippy
Copy link
Contributor

It looks like you ran the tool from within the tool's own source code. Since the tool is written in typescript that's likely why you got that language (weird that the file extension is .py though).

The tool is designed to be run from within a folder that has your other code (or an empty one I guess). When I run it inside a folder with python or ruby files it generally creates the right language for me.

@LucasOscarSimon
Copy link

It looks like you ran the tool from within the tool's own source code. Since the tool is written in typescript that's likely why you got that language (weird that the file extension is .py though).

The tool is designed to be run from within a folder that has your other code (or an empty one I guess). When I run it inside a folder with python or ruby files it generally creates the right language for me.

You're correct, I mistaken on that because I was trying to use it through powershell and since it didn't work I downloaded the souce code, then I followed the same approach I used with powershell but in the Linux that was inside Docker. My bad.

So... to start clean I deleted the source code folder inside the docker container and created a new one, I installed micro-agent through npm and now when I execute it it's asking me if I want to setup a new nodejs project, but I wanted to make something in python not in node.
micro-agent2

@tpaulshippy
Copy link
Contributor

tpaulshippy commented Jul 1, 2024

Ah yes. The tool does not actually work in a blank folder. Sorry I forgot that.

The folder has to have one of these three files in it --

  • package.json (node)
  • requirements.txt (python)
  • Gemfile (ruby)

The tool also requires a test framework of some kind because the tool generates a test, generates an implementation, and then runs the test to see if the implementation passes the test.

@tpaulshippy
Copy link
Contributor

See #24

@LucasOscarSimon
Copy link

Ah yes. The tool does not actually work in a blank folder. Sorry I forgot that.

The folder has to have one of these three files in it --

  • package.json (node)
  • requirements.txt (python)
  • Gemfile (ruby)

The tool also requires a test framework of some kind because the tool generates a test, generates an implementation, and then runs the test to see if the implementation passes the test.

Thank you very much for your answer @tpaulshippy :-)

It took me a lot of tests to configure the environment the right way but now it's working as expected!

micro-agent-exchange_rate_converter
testing_exchange_rate_converter

Great project you've made guys!
Thank you very much!

@LucasOscarSimon
Copy link

As you can see above it's running over WSL Ubuntu, and a VS Code extension to access to the WSL project folder.
I needed to install some python extensions, setup the unit tests using VS Code, rename the unit test file to follow python conventions, that allows the pytest framework to run the unit tests in the terminal and therefore allows micro-agent to run the python unit tests.

As I said, it took me a while but it worked :-)

@steve8708
Copy link
Contributor

ah, we could definitely make the DX better here to make this more clear, open to PRs to improve it!

@yjgoh28
Copy link
Author

yjgoh28 commented Jul 9, 2024

I have changed to mac OS and it works now.

@yjgoh28 yjgoh28 changed the title it doesnt start working it doesnt start working (Windows) Jul 9, 2024
@danividalg
Copy link

I have Windows 10 and it does not work for me
Any Solution ?

@LucasOscarSimon
Copy link

I have Windows 10 and it does not work for me Any Solution ?

Yeap, it worked with docker over wsl and it worked with wsl. Anyway I recently switched back to Linux.

@danividalg
Copy link

Any way to make it work without WSL ? (just with Windows cmd or powershell)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants