import { env, nextTick } from "node:process";
Cannot find module 'node:process' or its corresponding type declarations.
rerun typegen as well, what did i miss out?
6 Replies
Cloudflare Docs
process
The process module in Node.js provides a number of useful APIs related to the current process. Within a serverless environment like Workers, most of these APIs are not relevant or meaningful, but some are useful for cross-runtime compatibility. Within Workers, the following APIs are available:
help please
The typegen stuff sadly leaves a lot to be desired here. It promises types that match the runtime more accurately vs the older
workers-types method, but then doesn't provide any accurate types for node compat, leaving you having to use @types/node once more and all of the edge-cases that come along with it. cc @lrapoportcf @penalosahow come this works as well? i think this line suggested by cursor
import { env } from "cloudflare:workers"; the intellisense are correct from env.
i think cursor detected env in that package as well

assuming this not correct answer?