-
-
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
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