Skip to content

Commit 34d91b4

Browse files
authored
fix(nextjs): Add more fine-grained hoist pattern to IITM troubleshooting (#13825)
Addresses feedback from getsentry/sentry-javascript#8105 (comment)
1 parent 4a5bc07 commit 34d91b4

File tree

1 file changed

+9
-2
lines changed
  • docs/platforms/javascript/common/troubleshooting

1 file changed

+9
-2
lines changed

docs/platforms/javascript/common/troubleshooting/index.mdx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,9 +449,16 @@ While adding these packages as direct dependencies might remove the warning mess
449449
pnpm add import-in-the-middle require-in-the-middle
450450
```
451451
452-
As a workaround, create or modify `.npmrc` in your project root:
452+
As a workaround, create or modify `.npmrc` in your project root. First, try to specifially hoist the dependencies in question:
453453
454-
```npmrc
454+
```ini {filename:.npmrc}
455+
public-hoist-pattern[]=*import-in-the-middle*
456+
public-hoist-pattern[]=*require-in-the-middle*
457+
```
458+
459+
If that doesn't work, you can also tell pnpm to hoist all dependencies:
460+
461+
```ini {filename:.npmrc}
455462
shamefully-hoist=true
456463
```
457464

0 commit comments

Comments
 (0)