Skip to content

lodash-es 4.18.0 template.js throws ReferenceError: assignWith is not defined #6167

Description

@andrewbelu

Summary

After upgrading to lodash-es@4.18.0, importing and calling template from lodash-es/template.js throws:

ReferenceError: assignWith is not defined
    at template (file://.../node_modules/lodash-es/template.js:169:3)

This appears to be a regression in the published lodash-es4.18.0 package. The same reproduction works with lodash-es@4.17.21.

Minimal reproduction

npm init -y
npm install lodash-es@4.18.0
node --input-type=module -e "import template from 'lodash-es/template.js'; console.log(template('hi')({}))"

Actual result

file://.../node_modules/lodash-es/template.js:169
  options = assignWith({}, options, settings, customDefaultsAssignIn);
  ^

ReferenceError: assignWith is not defined
    at template (file://.../node_modules/lodash-es/template.js:169:3)

Expected result

import template from 'lodash-es/template.js'
console.log(template('hi')({}))
// => "hi"

Version comparison

  • Broken: lodash-es@4.18.0
  • Works: lodash-es@4.17.21

Environment

  • Node.js: reproduced on Node 22.3
  • Module format: ESM import from lodash-es/template.js

I believe this might be the commit that causes this error: 879aaa9

No activity

Activity on this issue will appear here.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions