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

When global Node.js objects are referenced, Deno should error out with a friendly error message #17494

Open
dsherret opened this issue Jan 22, 2023 · 2 comments
Labels
suggestion suggestions for new features (yet to be agreed)

Comments

@dsherret
Copy link
Member

dsherret commented Jan 22, 2023

Extracted from #17475

Objects that will be handled: process, global, Buffer, setImmediate, clearImmediate, module, exports.

Uncaught ReferenceError: process is not defined. 
    To use Node's process object in Deno, add this to `<filename>`:
        import process from "node:process";

For global the hint in the error should be globalThis.global = globalThis.

@dsherret dsherret added the suggestion suggestions for new features (yet to be agreed) label Jan 22, 2023
@aapoalas
Copy link
Collaborator

These should probably be LSP FixIts as well.

@dsherret dsherret mentioned this issue Jan 22, 2023
13 tasks
@calebegg
Copy link

I think this may now be obsolete, as deno appears to create an import for node:process automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

3 participants