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:
- yarn add @balkangraph/orgchart.js@9.3.26
- import OrgChart from '@balkangraph/orgchart.js'; in any Vite project
- 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
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:
Expected: builds correctly.
Actual: UNRESOLVED_IMPORT error as above.
Environment: