Skip to content

[9.3.26] Broken import '../free/orgchart.mjs' — missing file in published package #906

Description

@patricuxi

After upgrading @balkangraph/orgchart.js from 8.x to 9.3.26 via npm/yarn, our Vite build fails with:

[UNRESOLVED_IMPORT] Could not resolve '../free/orgchart.mjs' in node_modules/@balkangraph/orgchart.js/orgchart.mjs

The published orgchart.mjs contains:
import e from "../free/orgchart.mjs";

This path resolves to node_modules/@balkangraph/free/orgchart.mjs, which does not exist — there is no @balkangraph/free package published on npm, and the file is not included inside the orgchart.js package itself either.

Package contents after a clean install (yarn install, no cache):
node_modules/@balkangraph/orgchart.js/
orgchart.d.mts
orgchart.d.ts
orgchart.js
orgchart.mjs
package.json
readme.md

package.json declares "dependencies": {} — so this isn't a missing-dependency issue; it looks like a file that should have been bundled into the published package (or referenced correctly) but wasn't.

Steps to reproduce:

  1. yarn add @balkangraph/orgchart.js@9.3.26
  2. import OrgChart from '@balkangraph/orgchart.js'; in any Vite project
  3. Run vite dev

Expected: builds correctly.
Actual: UNRESOLVED_IMPORT error as above.

Environment:

  • @balkangraph/orgchart.js: 9.3.26
  • Vite: 8.1.3
  • Package manager: Yarn 1.22.21

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions