Replies: 2 comments
-
Wow this is a strange one. The backtrace contains stateless/self-contained calls: (map-nested-elt '(:id "REDACTED" :object "chat.completion" :created 1735569376 :model "o1-2024-12-17" :choices [(:index 0 :message (:role "assistant" :content "** Possible Causes\n\n1. The “dist/index.js” file has not been built yet. \n - If you have never run “yarn build” (or “yarn workspace server build”) successfully, there may simply be no “dist/index.js” yet for nodemon to run. \n2. The nodemon command is receiving more arguments than expected, causing it to interpret the second argument incorrectly. \n - Sometimes nodemon picks up both “dist/index.js” from the “main” field in package.json and the one you explicitly passed, thus running “node dist/index.js dist/index.js” (duplicating the file path).\n\n** How to Fix\n\n*** 1. Ensure that the code is compiled before nodemon tries to run it\n- Run “yarn workspace server build” at least once, or confirm that TypeScript has actually emitted the compiled files in “packages/server/dist/”. \n- After building, check that “packages/server/dist/index.js” is present. \n\n*** 2. Adjust your dev script so nodemon only points to one file\n- In “packages/server/package.json,” your dev script might look like this:\n #+BEGIN_SRC json\n \"scripts\": {\n \"build\": \"tsc -b\",\n \"dev\": \"tsc -b --watch & nodemon dist/index.js\"\n }\n #+END_SRC\n\n If nodemon is still trying to run your main file twice, try specifying the watch path explicitly:\n #+BEGIN_SRC json\n \"scripts\": {\n \"build\": \"tsc -b\",\n \"dev\": \"tsc -b --watch & nodemon --watch dist dist/index.js\"\n }\n #+END_SRC\n\n This ensures nodemon only watches the “dist” folder for changes and runs “dist/index.js” once.\n\n*** 3. Temporarily remove or modify “main” in package.json (if needed)\n- If nodemon is picking up “main”: “dist/index.js” automatically, you can remove or rename that field to confirm whether it’s causing duplication. \n- Typically, “main” is for Node to know which file to treat as the entry point when your package is required by something else, so you can safely remove it or rename it for local development.\n\n** Summary\n- First, confirm “dist/index.js” actually exists (i.e., that the TypeScript build ran successfully). \n- Then, ensure that nodemon is only triggered once and is pointed to the correct file. Often, making the dev script watch the “dist” folder and explicitly specifying the file to run is enough to fix the error. If it still runs into a conflict, removing or adjusting “main” in package.json can help." :refusal nil) :logprobs nil :finish_reason "stop")] :usage (:prompt_tokens 9454 :completion_tokens 1470 :total_tokens 10924 :prompt_tokens_details (:cached_tokens 0 :audio_tokens 0) :completion_tokens_details (:reasoning_tokens 896 :audio_tokens 0 :accepted_prediction_tokens 0 :rejected_prediction_tokens 0)) :system_fingerprint "REDACTED") '(:choices 0 :message :content)) and (seq-empty-p '(:choices 0 :message :content)) You can run these independent of the context, and they're very simple/predictable, assuming the Emacs built-ins (seq.el, map.el and cl-defgeneric) are loaded. So I'm stumped. |
Beta Was this translation helpful? Give feedback.
0 replies
-
gives me this output in Messages |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Please update gptel first -- errors are often fixed by the time they're reported.
Bug Description
Sometimes when I do
gptel-send
the response doesn't get added to the buffer. I'm not sure how to get into this state.Backend
OpenAI/Azure
Steps to Reproduce
I'm unsure
Additional Context
Backtrace
Beta Was this translation helpful? Give feedback.
All reactions