Coder Social home page Coder Social logo

Comments (10)

coltonehrman avatar coltonehrman commented on September 26, 2024 1

@marijaduvnjak You should be able to fix this by using the serverComponentsExternalPackages.

Example:

/** @type {import('next').NextConfig} */
const nextConfig = {
  poweredByHeader: false,
  output: "standalone",
  experimental: {
    instrumentationHook: true,
    serverComponentsExternalPackages: ["dd-trace"],
  },
  devIndicators: {
    buildActivity: false,
  },
  eslint: {
    ignoreDuringBuilds: true,
  },
};

from next.js.

moinulmoin avatar moinulmoin commented on September 26, 2024 1

`❯ nr
✔ script to run › build

[email protected] build /path/to/project
next build
▲ Next.js 14.2.1

Export encountered errors on following paths:
/page: /
ELIFECYCLE Command failed with exit code 1.`

getting this error on build in >= v14.2

working fine in < v14.2

from next.js.

FahimFBA avatar FahimFBA commented on September 26, 2024

I was facing the same issue. Came to know from Reddit that a specific PR is waiting to fix this issue.

from next.js.

drobannx avatar drobannx commented on September 26, 2024

Coming from a related issue, adding "dd-trace" fixed the issue for me.

When I run next dev --turbo, I get the error even with dd-trace added to serverComponentsExternalPackages

from next.js.

timneutkens avatar timneutkens commented on September 26, 2024

Seems something related to how dd-trace is now being bundled in instrumentation.ts. I haven't worked on that part of Next.js personally but will raise it to the right people 👍

from next.js.

FahimFBA avatar FahimFBA commented on September 26, 2024

It is working now!
image

from next.js.

marijaduvnjak avatar marijaduvnjak commented on September 26, 2024

@marijaduvnjak You should be able to fix this by using the serverComponentsExternalPackages.

Example:

/** @type {import('next').NextConfig} */
const nextConfig = {
  poweredByHeader: false,
  output: "standalone",
  experimental: {
    instrumentationHook: true,
    serverComponentsExternalPackages: ["dd-trace"],
  },
  devIndicators: {
    buildActivity: false,
  },
  eslint: {
    ignoreDuringBuilds: true,
  },
};

thanks a lot, coltonehrman, it works like a charm! 😃

just for curiosity: why do we need to add now dd-trace in serverComponentsExternalPackages? is there any change from changelogs in v14.2 that pointed out that we need to be aware of doing this change (and I overlooked it somehow 😅)?

from next.js.

marijaduvnjak avatar marijaduvnjak commented on September 26, 2024

`❯ nr ✔ script to run › build

[email protected] build /path/to/project
next build
▲ Next.js 14.2.1

Export encountered errors on following paths:
/page: /
ELIFECYCLE Command failed with exit code 1.`

getting this error on build in >= v14.2

working fine in < v14.2

maybe it's related to this issue: #64369 (comment)

from next.js.

manvydas-tbol avatar manvydas-tbol commented on September 26, 2024

serverComponentsExternalPackages didn't work when using pnpm... had to resort to this fix- #43433 (comment)

webpack: (config) => {
  config.externals.push({
    "dd-trace": "commonjs dd-trace",
  })
  return config
},

from next.js.

github-actions avatar github-actions commented on September 26, 2024

This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

from next.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.