Skip to content

@babel/runtime required with Next.js 15 #200

@nyg

Description

@nyg

Hello,

For information, I have the following error with a Next.js 15 project:

 ⨯ ./node_modules/.pnpm/react-marked-renderer@2.0.1_react@18.3.1/node_modules/react-marked-renderer/dist/index.mjs:2:1
Module not found: Can't resolve '@babel/runtime/helpers/defineProperty'
  1 | import require$$0, { createContext, useContext, useMemo, useCallback } from 'react';
> 2 | import _defineProperty from '@babel/runtime/helpers/defineProperty';
    | ^
  3 | import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
  4 |
  5 | /**

I solved it by simply adding the @babel/runtime dependency. Not sure why it is needed in this new Next.js version :).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions