Summary
Consuming DataVis NITRO via the public @mieweb/ui@0.6.1 npm package fails: the shipped dist/datavis.js imports the grid engine as an external bare package datavis using raw /src/*.ts paths, but that engine (@mieweb/datavis) is never published to npm. The repos being public on GitHub does not make the engine resolvable for an npm consumer.
Environment
- Consumer: Next.js 16 (App Router) + React 19 + Tailwind 4, pnpm 10
@mieweb/ui@0.6.1 (installed from npm)
datavis-ace@4.0.0-PRE.2 available on npm ✅ (this peer is not the problem)
What the published artifact actually contains
@mieweb/ui@0.6.1 -> exports["./datavis"] -> dist/datavis.js, whose imports are:
import { Source, ComputedView } from 'datavis-ace';
import { DataGrid } from 'datavis/src/components/DataGrid';
import { determineColumns } from 'datavis/src/adapters/colconfig-adapter';
import { getBuiltinGroupFunctions } from 'datavis/src/adapters/group-adapter';
import { buildAggregateFunctions } from 'datavis/src/adapters/wcdatavis-interop';
import { useView } from 'datavis/src/adapters/use-data';
import { TableRenderer } from 'datavis/src/components/table/TableRenderer';
The build externalized datavis/* rather than bundling it, so the consumer is left to resolve datavis/src/* themselves.
This contradicts the project's own documented build contract
CONTRIBUTING.md is explicit about what is external vs. bundled, and the datavis engine is not supposed to be a consumer-facing external:
- Build & bundle -> External lists only
react, react-dom, ag-grid-*, datavis-ace, @esheet/* as never-bundled peers. The datavis submodule engine is not in that list — yet dist/datavis.js emits bare datavis/src/* imports, i.e. it is being externalized without being a declared/installable peer.
- Optional peer dependencies lists
datavis-ace (not datavis) as what a consumer installs.
- Submodules table:
packages/datavis is "Linked into node_modules/datavis; postinstall repairs a stale link." That alias is monorepo-internal and the package is unpublished, so a consumer install never has it.
- The consumer adoption guide (
lessons/adopting-mieweb-ui.md) gives no instructions for obtaining a datavis engine, because there is no consumer-facing way to.
Why it can't resolve for a consumer
- Not on npm.
@mieweb/datavis -> 404. The only datavis on npm (datavis@1.0.0, maintainer xudafeng) is an unrelated name collision.
- Bare-name mismatch.
dist/datavis.js imports datavis but the package is named @mieweb/datavis; this only resolves inside this monorepo via the node_modules/datavis submodule link described in CONTRIBUTING.
- Source-only, not a library.
@mieweb/datavis is "private": true, version 0.1.0, a Vite app (scripts vite/vite build/storybook, has index.html + src/, no dist/) with no main/module/types/exports/files. The imports target uncompiled /src/*.ts, which Next.js will not transpile from node_modules by default.
- Conflicting dependency.
@mieweb/datavis depends on an older @mieweb/ui@0.3.0-dev.85 (plus @dnd-kit/*, i18next, react-i18next), i.e. a second copy of the library being consumed at 0.6.1.
Reproduction
pnpm add @mieweb/ui datavis-ace@4.0.0-PRE.2 in a Next.js 16 app.
import { ... } from '@mieweb/ui/datavis'.
- Build fails to resolve
datavis/src/components/DataGrid (and the other datavis/src/* specifiers).
Suggested fixes (either resolves it)
- Preferred: in the
@mieweb/ui tsup build, bundle datavis/* into dist/datavis.js instead of externalizing it (it is not in the documented External list, so this looks unintended). Then @mieweb/ui/datavis is self-contained and needs only the public datavis-ace peer.
- Alternative: publish
@mieweb/datavis to npm/GHCR as a real library — compiled dist, a proper exports map, private: false — and change @mieweb/ui/datavis to import from the package entry points rather than datavis/src/*.
Note
The other @mieweb/ui/* entry points (Button, Modal, Table, Sidebar, Badge, Toast, etc.) all consume cleanly from npm; this is specific to the ./datavis export. @mieweb/ui/ag-grid appears unaffected because its ag-grid-* peers are public on npm. Per CONTRIBUTING, NITRO is the preferred grid over AGGrid, which makes this the blocking path for grid adoption.
Summary
Consuming DataVis NITRO via the public
@mieweb/ui@0.6.1npm package fails: the shippeddist/datavis.jsimports the grid engine as an external bare packagedatavisusing raw/src/*.tspaths, but that engine (@mieweb/datavis) is never published to npm. The repos being public on GitHub does not make the engine resolvable for an npm consumer.Environment
@mieweb/ui@0.6.1(installed from npm)datavis-ace@4.0.0-PRE.2available on npm ✅ (this peer is not the problem)What the published artifact actually contains
@mieweb/ui@0.6.1->exports["./datavis"]->dist/datavis.js, whose imports are:The build externalized
datavis/*rather than bundling it, so the consumer is left to resolvedatavis/src/*themselves.This contradicts the project's own documented build contract
CONTRIBUTING.mdis explicit about what is external vs. bundled, and thedatavisengine is not supposed to be a consumer-facing external:react,react-dom,ag-grid-*,datavis-ace,@esheet/*as never-bundled peers. Thedatavissubmodule engine is not in that list — yetdist/datavis.jsemits baredatavis/src/*imports, i.e. it is being externalized without being a declared/installable peer.datavis-ace(notdatavis) as what a consumer installs.packages/datavisis "Linked intonode_modules/datavis;postinstallrepairs a stale link." That alias is monorepo-internal and the package is unpublished, so a consumer install never has it.lessons/adopting-mieweb-ui.md) gives no instructions for obtaining adatavisengine, because there is no consumer-facing way to.Why it can't resolve for a consumer
@mieweb/datavis-> 404. The onlydatavison npm (datavis@1.0.0, maintainerxudafeng) is an unrelated name collision.dist/datavis.jsimportsdatavisbut the package is named@mieweb/datavis; this only resolves inside this monorepo via thenode_modules/datavissubmodule link described in CONTRIBUTING.@mieweb/datavisis"private": true, version0.1.0, a Vite app (scriptsvite/vite build/storybook, hasindex.html+src/, nodist/) with nomain/module/types/exports/files. The imports target uncompiled/src/*.ts, which Next.js will not transpile fromnode_modulesby default.@mieweb/datavisdepends on an older@mieweb/ui@0.3.0-dev.85(plus@dnd-kit/*,i18next,react-i18next), i.e. a second copy of the library being consumed at0.6.1.Reproduction
pnpm add @mieweb/ui datavis-ace@4.0.0-PRE.2in a Next.js 16 app.import { ... } from '@mieweb/ui/datavis'.datavis/src/components/DataGrid(and the otherdatavis/src/*specifiers).Suggested fixes (either resolves it)
@mieweb/uitsup build, bundledatavis/*intodist/datavis.jsinstead of externalizing it (it is not in the documentedExternallist, so this looks unintended). Then@mieweb/ui/datavisis self-contained and needs only the publicdatavis-acepeer.@mieweb/datavisto npm/GHCR as a real library — compileddist, a properexportsmap,private: false— and change@mieweb/ui/datavisto import from the package entry points rather thandatavis/src/*.Note
The other
@mieweb/ui/*entry points (Button, Modal, Table, Sidebar, Badge, Toast, etc.) all consume cleanly from npm; this is specific to the./datavisexport.@mieweb/ui/ag-gridappears unaffected because itsag-grid-*peers are public on npm. Per CONTRIBUTING, NITRO is the preferred grid over AGGrid, which makes this the blocking path for grid adoption.