profiling-node icon indicating copy to clipboard operation
profiling-node copied to clipboard

Module parse failed: Unexpected character '�' (1:0)

Open haydenbleasel opened this issue 2 years ago • 58 comments

Is there an existing issue for this?

  • [X] I have checked for existing issues https://github.com/getsentry/profiling-node/issues
  • [X] I have reviewed the documentation https://docs.sentry.io/
  • [X] I am using the latest SDK release https://github.com/getsentry/profiling-node/releases

How do you use Sentry?

Sentry Saas (sentry.io)

SDK Version

1.0.7

Link to Sentry event

No response

What environment is your node script running in?

  • Next.js 13 app using App Directory, using "@sentry/nextjs": "^7.57.0"
  • MacOS Ventura 13.4.1 (22F82)
  • Node v18.12.1

How is your code deployed and bundled?

Standard Next.js build process running on Vercel. Here's the abstracted next.config.js:

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

/** @type {import('next').NextConfig} */
const nextConfig = {
  async rewrites() {
    return [
      {
        source: '/api/sentry/:path*',
        destination:
          'https://{x}.ingest.sentry.io/api/{y}/envelope/',
      },
    ];
  },
  sentry: {
    hideSourceMaps: true,
    tunnelRoute: '/api/sentry',
  },
};

/** @type {import('@sentry/nextjs').SentryWebpackPluginOptions} */
const sentryWebpackPluginOptions = {
  silent: true,
};

export default withSentryConfig(
  sentryWebpackPluginOptions
);

Steps to Reproduce

Following the installation instructions in the Sentry web UI, updated my sentry.server.config.js to the following:

import * as Sentry from '@sentry/nextjs';
import { ProfilingIntegration } from '@sentry/profiling-node';

Sentry.init({
  dsn: process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN
  tracesSampleRate: 1.0,
  profilesSampleRate: 1.0,
  integrations: [
    new ProfilingIntegration(),
  ],
});

Deploy to Vercel which runs npm build.

Potential follow-on issue from #164

Expected Result

The build should pass.

Actual Result

19:12:21.256 |  Failed to compile.
19:12:21.256 |  
19:12:21.256 | ./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-93.node
19:12:21.256 | Module parse failed: Unexpected character '�' (1:0)
19:12:21.256 | You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
19:12:21.257 | (Source code omitted for this binary file)
19:12:21.257 |  
19:12:21.257 | Import trace for requested module:
19:12:21.257 | ./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-93.node
19:12:21.257 | ./node_modules/@sentry/profiling-node/lib/index.js
19:12:21.257 | ./sentry.server.config.js
19:12:21.257 | ./app/layout.tsx
19:12:21.257 |  
19:12:21.257 | ./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-108.node
19:12:21.257 | Module parse failed: Unexpected character '�' (1:0)
19:12:21.257 | You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
19:12:21.257 | (Source code omitted for this binary file)
19:12:21.257 |  
19:12:21.257 | Import trace for requested module:
19:12:21.257 | ./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-108.node
19:12:21.257 | ./node_modules/@sentry/profiling-node/lib/index.js
19:12:21.257 | ./sentry.server.config.js
19:12:21.258 | ./app/layout.tsx
19:12:21.258 |  
19:12:21.258 | ./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-83.node
19:12:21.258 | Module parse failed: Unexpected character '' (1:0)
19:12:21.258 | You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
19:12:21.259 | (Source code omitted for this binary file)
19:12:21.259 |  
19:12:21.259 | Import trace for requested module:
19:12:21.259 | ./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-83.node
19:12:21.259 | ./node_modules/@sentry/profiling-node/lib/index.js
19:12:21.259 | ./sentry.server.config.js
19:12:21.259 | ./app/layout.tsx
19:12:21.259 |  
19:12:21.259 | ./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-93.node
19:12:21.259 | Module parse failed: Unexpected character '' (1:0)
19:12:21.259 | You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
19:12:21.259 | (Source code omitted for this binary file)
19:12:21.259 |  
19:12:21.259 | Import trace for requested module:
19:12:21.260 | ./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-93.node
19:12:21.260 | ./node_modules/@sentry/profiling-node/lib/index.js
19:12:21.260 | ./sentry.server.config.js
19:12:21.260 | ./app/layout.tsx
19:12:21.260 |  
19:12:21.260 | ./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-108.node
19:12:21.260 | Module parse failed: Unexpected character '' (1:0)
19:12:21.260 | You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
19:12:21.260 | (Source code omitted for this binary file)
19:12:21.260 |  
19:12:21.260 | Import trace for requested module:
19:12:21.260 | ./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-linux-arm64-glibc-108.node
19:12:21.260 | ./node_modules/@sentry/profiling-node/lib/index.js
19:12:21.260 | ./sentry.server.config.js
19:12:21.260 | ./app/layout.tsx
19:12:21.260 |  
19:12:21.260 |  
19:12:21.260 | > Build failed because of webpack errors

haydenbleasel avatar Jun 29 '23 23:06 haydenbleasel

@haydenbleasel you need to define a loader for .node files. This seems like it uses webpack and not turbopack so https://webpack.js.org/loaders/node-loader/ should be the correct way to go. A quick search reveals this comment from nextjs team which explains how to set this up https://github.com/vercel/next.js/discussions/34040#discussioncomment-4904466

JonasBa avatar Jun 30 '23 12:06 JonasBa

@JonasBa I have completed the node-loader setup, but the following warning appears when building.

../../node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
../../node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./src/app/layout.tsx

doinki avatar Jul 03 '23 11:07 doinki

We're experiencing this problem as well.

yarnPath: .yarn/releases/yarn-3.6.0.cjs with .pnp.cjs

    "@sentry/core": "^7.57.0",
    "@sentry/nextjs": "^7.57.0",
    "@sentry/profiling-node": "^1.0.8",
    "@sentry/utils": "^7.57.0",
    "next": "13.4.4",

Here are our build logs when we try to use Next.js with App Router

- warn Fast Refresh had to perform a full reload. Read more: https://nextjs.org/docs/messages/fast-refresh-reload
- wait compiling...
- error ./.yarn/unplugged/@sentry-profiling-node-npm-1.0.8-6c9dd4d639/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-108.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./.yarn/unplugged/@sentry-profiling-node-npm-1.0.8-6c9dd4d639/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-108.node
./.yarn/unplugged/@sentry-profiling-node-npm-1.0.8-6c9dd4d639/node_modules/@sentry/profiling-node/lib/ sync ^\.\/sentry_cpu_profiler\-.*\.node$
./.yarn/unplugged/@sentry-profiling-node-npm-1.0.8-6c9dd4d639/node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./app/[orgSlug]/[thread]/page.tsx
- wait compiling /_error (client and server)...
- error ./.yarn/unplugged/@sentry-profiling-node-npm-1.0.8-6c9dd4d639/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-108.node

kachar avatar Jul 10 '23 20:07 kachar

I'm looking into this issue today, from what I can tell, the message you see at build time Critical dependency: the request of a dependency is an expression is only a warning and should not affect loading. That said, I have changed the module loading to no longer be async and removed the expression from require which I'm hoping will suppress this.

JonasBa avatar Jul 13 '23 12:07 JonasBa

@doinki the warning is unfortunate, but I don't think we can get rid of this without breaking support for folks who don't use bundlers (which is a lot of nodejs application).

The reason you see the warning is because in cases where we do not find the prebuild binary for the target arch, we default to the version which was built from source - this way users on older/newer versions of nodejs or some "non standard" arch can still use the package. The problem is that we do not know all the possible permutations of those target environments, which means they are not statically analyzable by bundlers and hence cannot be hardcoded in the list.

Our binary loading logic handled this by having a default case in the switch platform/arch/node version (see cpu_profiler.ts), but here is a contrived example...

 switch (platform) {
    case 'darwin': {
      switch (arch) {
        case 'x64': {
          switch (abi) {
            case '93': {
              return require('./sentry_cpu_profiler-darwin-x64-93.node');
            }
            case '108': {
              return require('./sentry_cpu_profiler-darwin-x64-108.node');
            }
          }
        }
        ...other platform/arch/node versions
        If a user is in neither of the above permutations, fallthrough to the default require which
        attempts to load the binary that was built from source at install time.
        default: {
           require(path_to_binary_built_from_source) // <--- this is why you are seeing the warning
         }

So as you see, if we remove the require expression, we end up breaking support for everyone not in the hardcoded list, which we don't want to do. This is unfortunate and I agree, annoying, but I would rather deal with a warning than breaking the package. That said, I am going to try and see if I can use the contextReplacementPlugin from webpack to silence this warning.

JonasBa avatar Jul 13 '23 13:07 JonasBa

@doinki I will try to see if we can silence these warnings in the next version of the package.

@kachar, do you mind setting up the loader and seeing if you encounter the same issue?

JonasBa avatar Jul 13 '23 14:07 JonasBa

same problem happening with the following packages

 "@prisma/client": "^4.15.0",
    "@sentry/nextjs": "^7.59.3",
    "@sentry/profiling-node": "^1.1.2",
    "next": "13.4.4",
    

karamgaby avatar Aug 21 '23 10:08 karamgaby

@karamgaby can you share the error you are seeing? There are different errors in this issue - if you are only seeing a warning Critical dependency: the request of a dependency is an expression then you should ignore it, as I described in my comment, removing it would break support for every platform/arch that we do not provide precompiled binaries for.

If the error you are seeing is

Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

then you need to ensure your build system knows how to handle .node files. You can either configure a loader or mark the package as external (see our guide on bundling)

JonasBa avatar Aug 28 '23 14:08 JonasBa

@JonasBa mind providing an example with how this would work with vercel ncc? I cannot get this to work with webpack and nextjs as an external

mmahalwy avatar Sep 07 '23 06:09 mmahalwy

This worked for me:

next.config.js:

/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    serverActions: true,
  },
  webpack: (config) => {
    config.externals = {
      "@sentry/profiling-node": "commonjs @sentry/profiling-node", // fixes https://github.com/getsentry/profiling-node/issues/170
    };
    return config;
  },
};

module.exports = nextConfig;

// Injected content via Sentry wizard below
// ...

Not really, next dev works, but prod build fails to pre-render

Maxim-Mazurok avatar Sep 20 '23 01:09 Maxim-Mazurok

@mmahalwy we have a section on bundlers in our readme, you can see how to configure it there https://github.com/getsentry/profiling-node#bundling

@Maxim-Mazurok what is the error that you see at build time?

JonasBa avatar Sep 20 '23 05:09 JonasBa

npm run build

> [email protected] build
> next build

Failed to compile.

./node_modules/next/dist/compiled/next-server/pages.runtime.prod.js:1:32489
Module not found: Can't resolve 'critters'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module:
./node_modules/next/dist/server/future/route-modules/pages/module.compiled.js


> Build failed because of webpack errors
   Creating an optimized production build .

So I did npm i critters

And now I get this:

npm run build

> [email protected] build
> next build

 ⚠ Compiled with warnings

./node_modules/next/dist/compiled/@ampproject/toolbox-optimizer/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/next/dist/compiled/@ampproject/toolbox-optimizer/index.js
./node_modules/next/dist/compiled/next-server/pages.runtime.prod.js
./node_modules/next/dist/server/future/route-modules/pages/module.compiled.js

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./Box' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./ClickAwayListener' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./CssBaseline' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./darkScrollbar' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./Fade' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./Grow' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./Hidden' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./MenuList' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./NoSsr' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./Popper' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./Portal' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./RadioGroup' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./Slide' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./Stack' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./SwipeableDrawer' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./TextareaAutosize' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./useMediaQuery' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./usePagination' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./useScrollTrigger' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./Zoom' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./GlobalStyles' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=useTheme&wildcard!=!./generateUtilityClass' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Paper,Table,TableBody,TableCell,TableContainer,TableHead,TableRow,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/compareTable.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./Box' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./ClickAwayListener' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./CssBaseline' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./darkScrollbar' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./Fade' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./Grow' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./Hidden' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./MenuList' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./NoSsr' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./Popper' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./Portal' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./RadioGroup' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./Slide' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./Stack' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./SwipeableDrawer' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./TextareaAutosize' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./useMediaQuery' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./usePagination' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./useScrollTrigger' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./Zoom' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./GlobalStyles' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
The requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./generateUtilityClass' contains conflicting star exports for the name '__esModule' with the previous requested module '__barrel_optimize__?names=autocompleteClasses,styled,useTheme&wildcard!=!./utils'

Import trace for requested module:
__barrel_optimize__?names=Popper,Typography,autocompleteClasses,styled,useMediaQuery,useTheme!=!./node_modules/@mui/material/index.js
./app/utils/virtualizedInput.tsx
./app/compareForm.tsx
./app/home.tsx
./app/page.tsx

./node_modules/retry-request/index.js
Module not found: Can't resolve 'request' in '/home/maxim/my-project/node_modules/retry-request'

Import trace for requested module:
./node_modules/retry-request/index.js
./node_modules/google-gax/build/src/streamingCalls/streaming.js
./node_modules/google-gax/build/src/index.js
./node_modules/@googlemaps/routing/build/src/v2/routes_client.js
./node_modules/@googlemaps/routing/build/src/v2/index.js
./node_modules/@googlemaps/routing/build/src/index.js
./app/api/compare/route.ts

 ✓ Linting and checking validity of types   
 ✓ Collecting page data   
   Generating static pages (1/6) [=   ] 
TypeError: Cannot read properties of null (reading 'useContext')
    at ei.useContext (/home/maxim/my-project/.next/server/chunks/871.js:49:188589)
    at eb (/home/maxim/my-project/.next/server/chunks/871.js:36:24272)
    at eE (/home/maxim/my-project/.next/server/chunks/871.js:36:14841)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141914)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at aa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141462)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:142065)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:144318)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at ca (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:158062)
TypeError: Cannot read properties of null (reading 'useContext')
    at t.useContext (/home/maxim/my-project/.next/server/chunks/992.js:9:5495)
    at m (/home/maxim/my-project/.next/server/chunks/172.js:1:4501)
    at Wc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
    at Zc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
    at Z (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
    at $c (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
    at bd (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404)
    at Z (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217)
    at $c (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
    at Zc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:145)
TypeError: Cannot read properties of null (reading 'useContext')
    at t.useContext (/home/maxim/my-project/.next/server/chunks/992.js:9:5495)
    at m (/home/maxim/my-project/.next/server/chunks/172.js:1:4501)
    at Wc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
    at Zc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
    at Z (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
    at $c (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
    at bd (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404)
    at Z (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217)
    at $c (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
    at Zc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:145)

Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of null (reading 'useContext')
    at t.useContext (/home/maxim/my-project/.next/server/chunks/992.js:9:5495)
    at m (/home/maxim/my-project/.next/server/chunks/172.js:1:4501)
    at Wc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
    at Zc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
    at Z (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
    at $c (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
    at bd (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404)
    at Z (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217)
    at $c (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
    at Zc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:145)

Error occurred prerendering page "/500". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of null (reading 'useContext')
    at t.useContext (/home/maxim/my-project/.next/server/chunks/992.js:9:5495)
    at m (/home/maxim/my-project/.next/server/chunks/172.js:1:4501)
    at Wc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:68:44)
    at Zc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:70:253)
    at Z (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:89)
    at $c (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
    at bd (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:77:404)
    at Z (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:76:217)
    at $c (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:78:98)
    at Zc (/home/maxim/my-project/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js:71:145)
TypeError: Cannot read properties of null (reading 'useContext')
    at ei.useContext (/home/maxim/my-project/.next/server/chunks/871.js:49:188589)
    at eb (/home/maxim/my-project/.next/server/chunks/871.js:36:24272)
    at eE (/home/maxim/my-project/.next/server/chunks/871.js:36:14841)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141914)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at aa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141462)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:142065)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:144318)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156228)

Error occurred prerendering page "/_not-found". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of null (reading 'useContext')
    at ei.useContext (/home/maxim/my-project/.next/server/chunks/871.js:49:188589)
    at eb (/home/maxim/my-project/.next/server/chunks/871.js:36:24272)
    at eE (/home/maxim/my-project/.next/server/chunks/871.js:36:14841)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141914)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at aa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141462)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:142065)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:144318)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.pro
   Generating static pages (5/6) [==  ] 
   Creating an optimized production build ...TypeError: Cannot read properties of null (reading 'useContext')
    at ei.useContext (/home/maxim/my-project/.next/server/chunks/871.js:49:188589)
    at eb (/home/maxim/my-project/.next/server/chunks/871.js:36:24272)
    at eE (/home/maxim/my-project/.next/server/chunks/871.js:36:14841)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141914)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at aa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141462)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:142065)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:144318)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at ca (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.pro
   Generating static pages (5/6) [=== ] 
TypeError: Cannot read properties of null (reading 'useContext')
    at ei.useContext (/home/maxim/my-project/.next/server/chunks/871.js:49:188589)
    at eb (/home/maxim/my-project/.next/server/chunks/871.js:36:24272)
    at eE (/home/maxim/my-project/.next/server/chunks/871.js:36:14841)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141914)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at aa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141462)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:142065)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:144318)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156228)

Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of null (reading 'useContext')
    at ei.useContext (/home/maxim/my-project/.next/server/chunks/871.js:49:188589)
    at eb (/home/maxim/my-project/.next/server/chunks/871.js:36:24272)
    at eE (/home/maxim/my-project/.next/server/chunks/871.js:36:14841)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141914)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at aa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:141462)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:142065)
    at sa (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:144318)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js:1:156001)
    at ia (/home/maxim/my-project/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.pro
 ✓ Generating static pages (6/6)

> Export encountered errors on following paths:
        /_error: /404
        /_error: /500
        /_not-found
        /page: /
   Creating an optimized production build .

I've tried using latest stable next, and here's the next config:

/** @type {import('next').NextConfig} */
const nextConfig = {
  experimental: {
    serverActions: true,
  },
  webpack: (config) => {
    config.externals = {
      "@sentry/profiling-node": "commonjs @sentry/profiling-node", // fixes https://github.com/getsentry/profiling-node/issues/170
    };
    return config;
  },
};

module.exports = nextConfig;

// Injected content via Sentry wizard below

const { withSentryConfig } = require("@sentry/nextjs");

module.exports = withSentryConfig(
  module.exports,
  {
    // For all available options, see:
    // https://github.com/getsentry/sentry-webpack-plugin#options

    // Suppresses source map uploading logs during build
    silent: true,
    org: "travel-times",
    project: "javascript-nextjs",
  },
  {
    // For all available options, see:
    // https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/

    // Upload a larger set of source maps for prettier stack traces (increases build time)
    widenClientFileUpload: true,

    // Transpiles SDK to be compatible with IE11 (increases bundle size)
    transpileClientSDK: true,

    // Routes browser requests to Sentry through a Next.js rewrite to circumvent ad-blockers (increases server load)
    tunnelRoute: "/monitoring",

    // Hides source maps from generated client bundles
    hideSourceMaps: true,

    // Automatically tree-shake Sentry logger statements to reduce bundle size
    disableLogger: true,
  }
);

my next setup is pretty vanilla, using app router.

sentry configs also pretty much as wizard created them:

// This file configures the initialization of Sentry on the client.
// The config you add here will be used whenever a users loads a page in their browser.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import * as Sentry from "@sentry/nextjs";

Sentry.init({
  dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
  environment: process.env.NEXT_PUBLIC_ENVIRONMENT_NAME,

  // Adjust this value in production, or use tracesSampler for greater control
  tracesSampleRate: 1,

  // Setting this option to true will print useful information to the console while you're setting up Sentry.
  debug: false, // need to change `disableLogger` in next config to make this work

  replaysOnErrorSampleRate: 1.0,

  // This sets the sample rate to be 10%. You may want this to be 100% while
  // in development and sample at a lower rate in production
  replaysSessionSampleRate: 0.1,

  // You can remove this option if you're not planning to use the Sentry Session Replay feature:
  integrations: [
    new Sentry.Replay({
      // Additional Replay configuration goes in here, for example:
      // maskAllText: true,
      // blockAllMedia: true,
    }),
  ],
});

etc, hope it helps.

I decided to defer node profiling, it's not very important for me at this stage of the project.

Maxim-Mazurok avatar Sep 20 '23 06:09 Maxim-Mazurok

@Maxim-Mazurok, that is very weird. We do not use the critters package so it's unclear to me why this happens.

The error I'm seeing seems like a nextj react prerender error unrelated to @sentry/profiling-node

Creating an optimized production build ...TypeError: Cannot read properties of null (reading 'useContext')
    at ei.useContext (/home/maxim/my-project/.next/server/chunks/871.js:49:188589)

I'm going to try and setup a nextjs app and see if I can reproduce

JonasBa avatar Sep 20 '23 06:09 JonasBa

I also use MUI components and most of my components are "use client"; if that makes a difference... Overall I feel like nextjs is doing so much magic under the hood that the errors I'm getting on the way make very little sense, maybe it's just because it's my first nextjs project.

Maxim-Mazurok avatar Sep 20 '23 07:09 Maxim-Mazurok

Related to critters: https://github.com/vercel/next.js/issues/34763

Maxim-Mazurok avatar Sep 20 '23 07:09 Maxim-Mazurok

Hi I wanted to reopen this thread.

I'm trying to setup profiling for my next.js application. I modified sentry.server.config.ts with the following


profilesSampleRate: 1.0,
integrations: [
newProfilingIntegration(),
]

and have the following sentry versions defined:

"@sentry/integrations": "^7.74.1",
"@sentry/nextjs": "^7.74.1",
"@sentry/profiling-node": "^1.2.1",
"@sentry/types": "^7.74.1",

. This causes my build to fail with the following error:

./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-93.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-93.node
./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./app/page.tsx

./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-108.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-108.node
./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./app/page.tsx

./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-115.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-115.node
./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./app/page.tsx

./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-83.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-83.node
./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./app/page.tsx

./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-93.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-93.node
./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./app/page.tsx

I saw this related thread and added the following line to my next.config.js file:

config.externals = {
'@sentry/profiling-node':'commonjs @sentry/profiling-node',
}

and then installed critters but then received the following error:



SyntaxError: Unexpected identifier
--
14:05:12.695 | at internalCompileFunction (node:internal/vm:73:18)
14:05:12.695 | at wrapSafe (node:internal/modules/cjs/loader:1178:20)
14:05:12.695 | at Module._compile (node:internal/modules/cjs/loader:1220:27)
14:05:12.695 | at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
14:05:12.695 | at Module.load (node:internal/modules/cjs/loader:1119:32)
14:05:12.695 | at Module._load (node:internal/modules/cjs/loader:960:12)
14:05:12.695 | at Module.require (node:internal/modules/cjs/loader:1143:19)
14:05:12.695 | at mod.require (/vercel/path0/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]/node_modules/next/dist/server/require-hook.js:64:28)
14:05:12.695 | at require (node:internal/modules/cjs/helpers:121:18)
14:05:12.695 | at t.f.require (/vercel/path0/.next/server/webpack-runtime.js:1:1515) {
14:05:12.695 | type: 'SyntaxError'```

which wasn't very illustrative. I was wondering if there were any ideas on how to handle this.

nhewage1997 avatar Oct 24 '23 18:10 nhewage1997

@nhewage1997 I have the same problem. Haven't you fixed it yet? @JonasBa Can you help with such a problem? My errors during production build are the same as @nhewage1997 (almost 1 to 1).

Versions:

"next": "^13.5.4",
"@sentry/nextjs": "^7.77.0",
"@sentry/profiling-node": "^1.2.6",

tua-Mascot avatar Nov 08 '23 17:11 tua-Mascot

@nhewage1997 you shouldn't need to install critters for this to work. Do you mind uninstalling it and telling me if it still fails?

@tua-Mascot can you please share a relevant stack trace and confirm that you marked @sentry/profiling-node as an external module?

JonasBa avatar Nov 08 '23 20:11 JonasBa

I have the same issue when trying to integrate profiling in a nestjs project in mono-repo mode. Adding the package as external does not work. I removed profiling for now until the issue is fixed.

pablo-leone-realstocks avatar Nov 09 '23 11:11 pablo-leone-realstocks

@JonasBa Sure

Stack trace

Failed to compile.

./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-93.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-93.node
./node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./src/app/not-found.tsx

./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-108.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-108.node
./node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./src/app/not-found.tsx

./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-115.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-115.node
./node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./src/app/not-found.tsx

./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-83.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-83.node
./node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./src/app/not-found.tsx

./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-93.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-x64-93.node
./node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./src/app/not-found.tsx


> Build failed because of webpack errors

And I added this to next.config.js

experimental: {
    serverComponentsExternalPackages: ['@sentry/profiling-node']
  },

I can provide some additional information:

  • I primarily use Windows 10, but I also attempted to build and run under Ubuntu 22.04.2 LTS (WSL) - get exactly the same result (or a very similar result).
  • I have tried deleting .next, node_modules, and package-lock multiple times - this does not help.

tua-Mascot avatar Nov 10 '23 16:11 tua-Mascot

@JonasBa Sorry to bother you, but more than a week has passed. Are there any updates/news?

tua-Mascot avatar Nov 17 '23 06:11 tua-Mascot

@tua-Mascot mind creating a reproducible case for this? I think that adding your component to external packages didn't work as the build system is still trying to resolve that file

JonasBa avatar Nov 17 '23 13:11 JonasBa

I have the same issue, when marking it as external I'm missing the "critters" package.

florianjuengermann avatar Nov 22 '23 19:11 florianjuengermann

Here's a reproducible case for this issue. Checking out this commit produces the following error. Ref: https://github.com/anonrig/yagiz.co/commit/ef3c8afe923f573f83b30190937cccf36e2d2ac5

./node_modules/.pnpm/@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-93.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

anonrig avatar Dec 04 '23 21:12 anonrig

Adding serverComponentsExternalPackages: ['@sentry/profiling-node'], seems to fix the issue for Next.js 14. Which document do you import/require @sentry/profiling-node package? It should be inside sentry.server.{js,ts}

anonrig avatar Dec 04 '23 22:12 anonrig

Getting this error as well on a new project with Sentry setup.

I've tried doing ... serverComponentsExternalPackages: ['@sentry/profiling-node'] in the next config, but hasn't changed anything.

Key relevant packages

"next": "^14.0.4",
"@sentry/nextjs": "^7.88.0",
"@sentry/profiling-node": "^1.3.2",

Happy to try and provide more info if that will help, otherwise disabling profiling for the time being

Simplest repro: https://github.com/Starter4Ten/Sentry-NextJS-Explore/releases/tag/server-profile-issue

npm install
npm run build

smozely avatar Dec 17 '23 06:12 smozely

Is there any update? Meet the same issue.ServerComponentsExternalPackages only works for development, still get error when building. image

jiushiwoyuze avatar Jan 15 '24 08:01 jiushiwoyuze

@nikolovlazar This is something I just ran into. Which is the issue I mentioned during the webinar just now. I also don't know why it's trying to read the darwin file instead of linux to be honest. Maybe thats the issue?

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Mon Nov 6 23:32:38 UTC 2023
Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: 1.22.21
  pnpm: 8.14.1

I'm running Arch under wsl2 and when adding the profiling integration I got greeted with the following error:

./node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-93.node
Module parse failed: Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

Import trace for requested module:
./node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@sentry/profiling-node/lib/sentry_cpu_profiler-darwin-arm64-93.node
./node_modules/.pnpm/@[email protected]_@[email protected]/node_modules/@sentry/profiling-node/lib/index.js
./sentry.server.config.ts
./src/app/page.tsx

repo: https://github.com/JesseKoldewijn/JKinsight

JesseKoldewijn avatar Jan 17 '24 19:01 JesseKoldewijn

@JesseKoldewijn Your Next.js config file does not have experimental.serverComponentsExternalPackages attribute. Ref: https://github.com/getsentry/profiling-node#bundling

anonrig avatar Jan 17 '24 22:01 anonrig

@JesseKoldewijn Your Next.js config file does not have experimental.serverComponentsExternalPackages attribute. Ref: https://github.com/getsentry/profiling-node#bundling

Ah check. Thanks, will check if that's the fix later today👌

JesseKoldewijn avatar Jan 18 '24 06:01 JesseKoldewijn