Skip to content

codeFrame is not a function #51

Open

Description

@kirannuclear

I'm getting this error when I build using webpack.

ERROR in ./controllers/_config.js Module build failed (from ./node_modules/babel-loader/lib/index.js): TypeError: codeFrame is not a function at isAnnotatedArray (C:\xampp\htdocs\Mininfy app\apartment-management-system\ApartmentManagementSystemUI\node_modules\babel-plugin-angularjs-annotate\nginject.js:401:23) at Object.inspectFunction (C:\xampp\htdocs\Mininfy app\apartment-management-system\ApartmentManagementSystemUI\node_modules\babel-plugin-angularjs-annotate\nginject.js:104:9) at PluginPass.enter (C:\xampp\htdocs\Mininfy app\apartment-management-system\ApartmentManagementSystemUI\node_modules\babel-plugin-angularjs-annotate\babel-ng-annotate.js:103:20)

webpack config:

` module: {
rules : [
{
test : /controllers.*.js$/,
use : [

      {
        loader : 'babel-loader',
        query: {
          plugins: ['angularjs-annotate'],
          presets: ['@babel/preset-env']
      }
      }
    ]
  },
  {
    test : /src.*\.tpl\.html$/,
    use  : [
      {
        loader : 'raw-loader'
      }
    ]
  }
],

},`

Activity

  1. travislaynewilson commented on Jun 6, 2025

    @travislaynewilson

    I'm also experiencing this, even after installing @babel/code-frame 7.27.1 as a dev dependency.

  2. travislaynewilson commented on Jun 6, 2025

    @travislaynewilson

    @kirannuclear For me, I discovered that this error was occurring when the dependencies didn't match the arguments in the function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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