newrelic-experimental / newrelic-nextjs-integration

NewRelic Browser and APM agent NextJs integration (front and back-end respectively)
Apache License 2.0
27 stars 22 forks source link

Giving Build error in next.js 13.4 #22

Closed ramnalawade1986 closed 3 days ago

ramnalawade1986 commented 5 months ago

Giving Build error in next.js 13.4

andrewmclagan commented 5 months ago

Also seeing this build error

Module parse failed: Unexpected token (1:40)
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
>                                  Apache License
|                            Version 2.0, January 2004
|                         http://www.apache.org/licenses/

Import trace for requested module:
../../../node_modules/.pnpm/newrelic@11.10.0/node_modules/newrelic/LICENSE
../../../node_modules/.pnpm/newrelic@11.10.0/node_modules/newrelic/ sync ^\.\/.*$
../../../node_modules/.pnpm/newrelic@11.10.0/node_modules/newrelic/index.js
./src/app/layout.tsx
matewilk commented 3 days ago

Please add:

  experimental: {
    serverComponentsExternalPackages: ['newrelic']
  },

to your next.config.js when used with App Based router.