Skip to content
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

TypeError: Cannot read properties of undefined (reading 'cliBinaryExists') #8576

Closed
3 tasks done
simPod opened this issue Jul 18, 2023 · 1 comment · Fixed by #8584
Closed
3 tasks done

TypeError: Cannot read properties of undefined (reading 'cliBinaryExists') #8576

simPod opened this issue Jul 18, 2023 · 1 comment · Fixed by #8584

Comments

@simPod
Copy link

simPod commented Jul 18, 2023

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/nextjs

SDK Version

13.4.9

Framework Version

18.2.0

Link to Sentry event

No response

SDK Setup

Sentry.init({
  dsn: SentryDsn,
  environment: process.env.NEXT_PUBLIC_ENVIRONMENT,
  integrations: [new CaptureConsole({ levels: ['assert', 'error', 'warn'] })],
  release: process.env.NEXT_PUBLIC_RELEASE,
  sendDefaultPii: true,
  tracesSampleRate: 0.1,
});

Steps to Reproduce

image

I use import { withSentryConfig } from '@sentry/nextjs';

and

const nextConfig = {
  reactStrictMode: true,
  // Disable sentry plugin
  // https://github.com/getsentry/sentry-javascript/blob/115b0f3c07efa755c8f90d32cfd1783a35451eba/packages/nextjs/src/config/webpack.ts#L82-84
  sentry: {
    disableClientWebpackPlugin: true,
    disableServerWebpackPlugin: true,
  },

next build

Expected Result

No errors

Actual Result

During build

yarn run build
- warn No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
- info Linting and checking validity of types...
- warn The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/basic-features/eslint#migrating-existing-config
- info Creating an optimized production build...
> Build error occurred
TypeError: Cannot read properties of undefined (reading 'cliBinaryExists')
    at shouldEnableWebpackPlugin (/builds/project/.yarn/__virtual__/@sentry-nextjs-virtual-8ab386e88f/4/build-cache/yarn/cache/@sentry-nextjs-npm-7.59.2-4ce32cadc9-10c0.zip/node_modules/@sentry/nextjs/cjs/config/webpack.js:764:28)
    at Object.newWebpackFunction [as webpack] (/builds/project/.yarn/__virtual__/@sentry-nextjs-virtual-8ab386e88f/4/build-cache/yarn/cache/@sentry-nextjs-npm-7.59.2-4ce32cadc9-10c0.zip/node_modules/@sentry/nextjs/cjs/config/webpack.js:285:9)
    at getBaseWebpackConfig (/builds/project/.yarn/__virtual__/next-virtual-598703b69f/4/build-cache/yarn/cache/next-npm-13.4.9-5c37513773-10c0.zip/node_modules/next/dist/build/webpack-config.js:2152:32)
    at async Promise.all (index 1)
    at async Span.traceAsyncFn (/builds/project/.yarn/__virtual__/next-virtual-598703b69f/4/build-cache/yarn/cache/next-npm-13.4.9-5c37513773-10c0.zip/node_modules/next/dist/trace/trace.js:103:20)
    at async webpackBuildImpl (/builds/project/.yarn/__virtual__/next-virtual-598703b69f/4/build-cache/yarn/cache/next-npm-13.4.9-5c37513773-10c0.zip/node_modules/next/dist/build/webpack-build/impl.js:133:21)
    at async webpackBuild (/builds/project/.yarn/__virtual__/next-virtual-598703b69f/4/build-cache/yarn/cache/next-npm-13.4.9-5c37513773-10c0.zip/node_modules/next/dist/build/webpack-build/index.js:137:16)
    at async /builds/project/.yarn/__virtual__/next-virtual-598703b69f/4/build-cache/yarn/cache/next-npm-13.4.9-5c37513773-10c0.zip/node_modules/next/dist/build/index.js:584:123
    at async Span.traceAsyncFn (/builds/project/.yarn/__virtual__/next-virtual-598703b69f/4/build-cache/yarn/cache/next-npm-13.4.9-5c37513773-10c0.zip/node_modules/next/dist/trace/trace.js:103:20)
    at async build (/builds/project/.yarn/__virtual__/next-virtual-598703b69f/4/build-cache/yarn/cache/next-npm-13.4.9-5c37513773-10c0.zip/node_modules/next/dist/build/index.js:145:29)
@slicen
Copy link

slicen commented Jul 18, 2023

Appears related to / caused by #8557

Lms24 added a commit that referenced this issue Jul 19, 2023
…#8584)

For some reason, dynamic requires of our
webpack plugin don't work for some users. We still don't have a better
fix for #8541 so let's just get this in to unblock folks.

closes #8576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants