Skip to content

Fix ESM/CJS resolution fully specified issue#271

Closed
smeng9 wants to merge 1 commit intounifiedjs:mainfrom
smeng9:patch-1
Closed

Fix ESM/CJS resolution fully specified issue#271
smeng9 wants to merge 1 commit intounifiedjs:mainfrom
smeng9:patch-1

Conversation

@smeng9
Copy link
Copy Markdown

@smeng9 smeng9 commented Mar 24, 2026

Initial checklist

  • I read the support docs
  • I read the contributing guide
  • I agree to follow the code of conduct
  • I searched issues and discussions and couldn’t find anything or linked relevant results below
  • I made sure the docs are up to date
  • I included tests (or that’s not needed)

Description of changes

Fix the issue when used as a dependency under docusaurus

[ERROR] Client bundle compiled with errors therefore further build is impossible.
× Module not found: Can't resolve 'extend' in '/home/xxxxxxxx/.yarn/berry/cache/unified-npm-11.0.5-ac5333017e-10c0.zip/node_modules/unified/lib'
╭─[350:0]
348 │
349 │ import {bail} from 'bail'
350 │ import extend from 'extend'
· ───────────────────────────
351 │ import {ok as assert} from 'devlop'
352 │ import isPlainObj from 'is-plain-obj'
╰────
help: Did you mean '/home/xxxxxxxx/.yarn/berry/cache/extend-npm-3.0.2-e1ca07ac54-10c0.zip/node_modules/extend/index.js'?

    The request 'extend' failed to resolve only because it was resolved as fully specified,
    probably because the origin is strict EcmaScript Module,
    e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'.
    
    The extension in the request is mandatory for it to be fully specified.
    Add the extension to the request.

Signed-off-by: smeng9 <38666763+smeng9@users.noreply.github.com>
@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Mar 24, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b69689b) to head (cd8f121).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #271   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines         1364      1363    -1     
=========================================
- Hits          1364      1363    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@remcohaszing
Copy link
Copy Markdown
Member

This is a bug with your bundler, not unified.

@github-actions

This comment has been minimized.

@remcohaszing remcohaszing added 🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Mar 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on

Development

Successfully merging this pull request may close these issues.

2 participants