Closed dwolrdcojp closed 3 months ago
Assigning to @getsentry/support for routing ⏲️
Hello, this doesn't seem to be an issue outside of a monorepo when creating a fresh nextjs app and using our wizard. Could you please provide a reproduction repo or a stackblitz?
Hello, this doesn't seem to be an issue outside of a monorepo when creating a fresh nextjs app and using our wizard. Could you please provide a reproduction repo or a stackblitz?
While I was working on creating a reproduction repo this error disappeared. I removed node_modules and package-lock.json from all the repos in the monorepo and did a fresh npm install
and now it's building correctly without the need for that package in next project. Thanks.
Environment
SaaS (https://sentry.io/)
What are you trying to accomplish?
I used the Sentry SDK wizard to install Sentry for our Next.js application.
npx @sentry/wizard@latest -i nextjs
After following all the steps and it seemed to be working in development, when running
npm run build
for Next.js application the build step would fail because it couldn't resolve packagehoist-non-react-statics
I'm not sure why this dependency needs to be installed manually in order for the build to succeed... and why it wasn't a dependency for the npm package.
"@sentry/nextjs": "^8.24.0",
How are you getting stuck?
Build step failing in CI log
We're using a monorepo with npm workspaces
root monorepo dir package.json
root_dir/next
package.json
After adding ' "hoist-non-react-statics": "^3.3.2",` to dependencies the build will succeed
Using Next.js 14.2.5
Where in the product are you?
Unknown
Link
No response
DSN
No response
Version
No response