#Tutorial doesn't actually work with Node 16

4 messages · Page 1 of 1 (latest)

wise gale
#

If you do the tutorial steps to start developing with Convex with Node v16.10.0, you'll get an error:

npm run dev

> convex-tour-chat-0@0.0.0 predev
> convex dev --run init --until-success

/convex-tour-chat/node_modules/convex/dist/cli.bundle.cjs:129136
var retryingFetch = (0, import_fetch_retry.default)(fetch);
                                                    ^

ReferenceError: fetch is not defined
    at Object.<anonymous> (/convex-tour-chat/node_modules/convex/dist/cli.bundle.cjs:129136:53)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:196:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:183:25)
    at async Loader.import (node:internal/modules/esm/loader:178:24)

This error can be fixed by upgrading to a newer version of Node. It works fine with v22.12.0.

south quartzBOT
#

Thanks for posting in #1088161997662724167.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.

    - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
    - Use [search.convex.dev](https://search.convex.dev) to search Docs, Stack, and Discord all at once.
    - Additionally, you can post your questions in the Convex Community's #1228095053885476985 channel to receive a response from AI.
    - Avoid tagging staff unless specifically instructed.

    Thank you!
lavish canyon
#

Why are u excactly using Node 16? Its support ended over a year ago. Wouldnt it make more sense for you using Node 22 or is there anything I miss here? https://endoflife.date/nodejs

endoflife.date

Check end-of-life, release policy and support schedule for Node.js.

neat iris
#

Yea. The upcoming tutorial update is about to reccomend 18+. 16 is end of lifed