[go: up one dir, main page]

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

[Tooling] Error in app process #625

Closed
dario-digregorio opened this issue Jul 15, 2024 · 3 comments · Fixed by #671
Closed

[Tooling] Error in app process #625

dario-digregorio opened this issue Jul 15, 2024 · 3 comments · Fixed by #671
Assignees
Labels
bug Something isn't working tooling

Comments

@dario-digregorio
Copy link

Describe the bug
I just followed the nextJS example in the docs and get this error:

Error: Error in app process: spawn /usr/local/lib/node_modules/genkit/node_modules/@genkit-ai/tools-common/node_modules/.bin/tsx ENOENT

I have an repo which you can see the error.

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/dario-digregorio/genkit-example
  2. genkit start

Expected behavior
Should start Genkit

Desktop (please complete the following information):

  • OS: MacOS
  • Version node v20.15.1
@dario-digregorio dario-digregorio added bug Something isn't working tooling labels Jul 15, 2024
@cabljac cabljac self-assigned this Jul 17, 2024
@chrisraygill chrisraygill added P0 and removed P1 labels Jul 18, 2024
@ariel-pettyjohn
Copy link
ariel-pettyjohn commented Jul 22, 2024

Same issue here when I run genkit start after initializing Genkit with a brand new Next.js project:

Error: Error in app process: spawn C:\Users\Ariel\AppData\Roaming\npm\node_modules\genkit\node_modules\@genkit-ai\tools-common\node_modules\.bin\tsx ENOENT

Note: I noticed that ...\genkit\node_modules\@genkit-ai\tools-common\node_modules weren't installed, so I installed them manually with npm install, and verified that ...\genkit\node_modules\@genkit-ai\tools-common\node_modules\.bin\tsx is now installed in that location; however, I still get the same ENOENT error as if it can't find tsx.

OS: Windows 11 Home
Version node: 20.12.2
Version npm/npx: 10.8.0
Version tsx: 4.15.7

@ariel-pettyjohn
Copy link
ariel-pettyjohn commented Jul 22, 2024

I'm not sure if this has any relation to my previous observation about the ...\tools-common\node-modules, but if I delete the genkit-tools.conf.js that gets generated by genkit init then the above ENOENT error goes away.

Here are the contents of that file on my system:

module.exports = { runner: { mode: 'harness', files: ['./src/app/*.ts'], }, };

Note that I still get the above ENOENT error even when there is an index.ts or generate.ts file present in the app directory to be compiled.

@cabljac
Copy link
Contributor
cabljac commented Jul 23, 2024

The Next.js docs don't mention running npm install which is probably needed in some situations, e.g if you clone a repo and just try to run genkit start you'll likely run into a "module not found" error. I'll start a thread in the Genkit discord server about making the docs clearer there.

I haven't been able to reproduce the error by cloning the repo @dario-digregorio provided. I'll try with a new Next.js project.

EDIT: I've reproduced this by following the docs in a brand new Next.js project

Ah the problem is something doesn't have executable permissions. Doing chmod +x to the tsx path referenced fixed this for me i think.

Actually when i do a fresh install of Genkit globally, the node_modules for the tools package doesn't exist at all now, weird.

Seems relevant, I think this is part of the problem:

https://github.com/firebase/genkit/blob/main/genkit-tools/common/src/runner/runner.ts#L180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tooling
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants