Closed
Description
- Review the documentation: https://docs.sentry.io/
- Search for existing issues: https://github.com/getsentry/sentry-javascript/issues
- Use the latest release: https://github.com/getsentry/sentry-javascript/releases
- [] Provide a link to the affected event from your Sentry account
Package + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) - other:
Version:
@sentry/nextjs
Description
When I tried to install latest @sentry/nextjs package I got this error:
npm install --save @sentry/nextjs
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: ***@0.1.0
npm ERR! Found: next@11.0.0
npm ERR! node_modules/next
npm ERR! next@"11.0.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer next@"^10.0.8" from @sentry/nextjs@6.7.1
npm ERR! node_modules/@sentry/nextjs
npm ERR! @sentry/nextjs@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/prism/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/prism/.npm/_logs/2021-06-17T17_56_44_854Z-debug.log
here is my project package.json
{
"name": "***",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"size": "ANALYZE=true next build",
"start": "next start -p 4321"
},
"dependencies": {
"@next/bundle-analyzer": "^11.0.0",
"axios": "^0.21.1",
"escape-string-regexp": "^5.0.0",
"luxon": "^1.27.0",
"next": "11.0.0",
"next-pwa": "^5.2.21",
"next-seo": "^4.25.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-responsive-carousel": "^3.2.18"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/preset-env": "^7.14.5",
"bulma": "^0.9.2",
"sass": "^1.35.1",
"webpack": "^5.39.0"
}
}
and next.config.js content:
const withPWA = require('next-pwa');
const path = require('path');
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
let domain = '***';
let nextConfig = {
target: "serverless",
sassOptions: {
includePaths: [path.join(__dirname, 'styles')],
},
env: {
domain: domain,
},
images: {
domains: ['***'],
},
pwa: {
dest: 'public',
}
}
if(process.env.DEBUG) {
domain = 'http://localhost:8000';
module.exports = withBundleAnalyzer({
env: {
domain: domain,
},
images: {
domains: ['**'],
},
})
}
module.exports = withPWA(nextConfig);