#use node action fails in node v18 convex local development

4 messages · Page 1 of 1 (latest)

twilit garden
#

Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' when running npx convex dev --dev and executing a Node v18 "use node" action

queen pathBOT
#

Hi @twilit garden. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

I'm sorry, but the knowledge sources do not contain explicit information about the specific error message:

Only URLs with a scheme in: file, data, and node are supported by the default ESM loader. On Windows, absolute paths must be valid file:// URLs. Received protocol 'c:' when running npx convex dev --dev and executing a Node v18 "use node" action

However, there are several related discussions about issues running "use node" actions and local development with Node v18, especially on Windows. The main recommendations are:

  • Node.js 18 is required for running Node actions in local Convex development, as this matches the production environment (Convex Local Deployments Limitations).
  • There have been various issues with local deployments and Node version compatibility, particularly on Windows and Linux, but the specific error you mention is not detailed in the sources.
  • If you encounter persistent issues, you might try:
    • Ensuring you are using Node.js 18 (not a higher version).
    • Deleting and reinstalling your node_modules and lock files.
    • Running Convex commands in a different terminal or shell (some issues have been reported with certain shells).
    • If the problem persists, consider running against a cloud deployment as a temporary workaround (Convex Local Dev Deployments failing).

If none of these steps resolve your issue, the knowledge sources suggest that this may be a regression or platform-specific bug, and you may want to report it to the Convex team for further investigation.

#

Again, the exact error message regarding ESM loader and file URLs on Windows is not addressed in the provided sources.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: