-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
docs(js): Update Nest.js installation method content #13765
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
docs(js): Update Nest.js installation method content #13765
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
Bundle ReportChanges will increase total bundle size by 1.12kB (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sentry-docs-server-cjsAssets Changed:
view changes for bundle: sentry-docs-client-array-pushAssets Changed:
|
Co-authored-by: Charly Gomez <[email protected]>
…stjs/rework-installation-methods
…etsentry/sentry-docs into smi/nestjs/rework-installation-methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Left some small suggestions
Adjust the Node.js call for your application to use the [--import](https://nodejs.org/api/cli.html#--importmodule) parameter and point it at `instrument.mjs`, which contains your `Sentry.init()` code: | ||
|
||
```bash | ||
# Note: This is only available for Node v18.19.0 onwards. | ||
node --import ./instrument.mjs dist/main.js | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjust the Node.js call for your application to use the [--import](https://nodejs.org/api/cli.html#--importmodule) parameter and point it at `instrument.mjs`, which contains your `Sentry.init()` code: | |
```bash | |
# Note: This is only available for Node v18.19.0 onwards. | |
node --import ./instrument.mjs dist/main.js | |
``` | |
Adjust the start command for your application to use the [--import](https://nodejs.org/api/cli.html#--importmodule) parameter: | |
```bash | |
# Note: This is only available for Node v18.19.0 onwards. | |
"start": "--import ./instrument.mjs nest start" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chargome I will make the same update to the esm__v8.x.mdx file
```javascript {filename: main.js} | ||
// Import this first! | ||
import "./instrument"; | ||
|
||
// Now import other modules | ||
import http from "http"; | ||
|
||
// Your application code goes here | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```javascript {filename: main.js} | |
// Import this first! | |
import "./instrument"; | |
// Now import other modules | |
import http from "http"; | |
// Your application code goes here | |
``` | |
```javascript {filename: main.ts} | |
// Import this first! | |
import "./instrument"; | |
// Now import other modules | |
import { NestFactory } from '@nestjs/core'; | |
// ... | |
// Your application code goes here |
Most node applications today are either written in CommonJS (CJS), or compiled to CJS before running them. | ||
CommonJS uses `require()` to load modules. | ||
|
||
You can find installation instructions for CommonJS in the SDK's <PlatformLink to="/">Quick Start guide</PlatformLink>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can find installation instructions for CommonJS in the SDK's <PlatformLink to="/">Quick Start guide</PlatformLink>. | |
You can follow the instructions in the SDK's <PlatformLink to="/">Quick Start guide</PlatformLink>. |
docs/platforms/javascript/guides/nestjs/install/esm-without-import.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/guides/nestjs/install/esm-without-import.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/guides/nestjs/install/esm-without-import.mdx
Outdated
Show resolved
Hide resolved
docs/platforms/javascript/guides/nestjs/install/esm-without-import.mdx
Outdated
Show resolved
Hide resolved
}); | ||
``` | ||
|
||
Adjust the Node.js call for your application to use the [--import](https://nodejs.org/api/cli.html#--importmodule) parameter and point it at `instrument.mjs`, which contains your `Sentry.init()` code: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adjust the Node.js call for your application to use the [--import](https://nodejs.org/api/cli.html#--importmodule) parameter and point it at `instrument.mjs`, which contains your `Sentry.init()` code: | |
Next, adjust the Node.js call for your application to use the [--import](https://nodejs.org/api/cli.html#--importmodule) parameter and point it at `instrument.mjs`, which contains your `Sentry.init()` code: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! 😊
…stjs/rework-installation-methods
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR Closes: #13525 - Created an /install section for nestjs (in the project structure) - index page: added a section for Nest.js - CJS: removed content and linked to quick start guide - Nestjs will not display late-initialization.mdx file - updated "@sentry/node" to "@sentry/nestjs" - updated node --import commands for ESM Please also review the installation method pages to see if we need to change anything else for Nest.js! ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [ ] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/) --------- Co-authored-by: Charly Gomez <[email protected]>
DESCRIBE YOUR PR
Closes: #13525
Please also review the installation method pages to see if we need to change anything else for Nest.js!
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
EXTRA RESOURCES