Article View: linux.debian.bugs.dist
Article #2480Bug#1152358: node-diff: "browser" points at dist/, which never reaches the source tarball
From: Wei Zhou
Date: Wed, 28 Oct 2026 14:00
Date: Wed, 28 Oct 2026 14:00
25 lines
2461 bytes
2461 bytes
Package: node-diff
Version: 8.0.4~dfsg-3
Severity: normal
package.json declares "browser": "./dist/diff.js", but dist/ is not there:
it is built by `yarn build` (rollup + uglify) and only ships in the npm
tarball. Debian's orig comes from the GitHub archive, and Files-Excluded
lists only images, so the field points at nothing.
Node and bundlers that follow "exports" are fine; browser-resolve, which
browserify uses, prefers "browser" and gives up:
$ echo 'module.exports = require("sinon/lib/sinon.js")' > /tmp/e.js
$ NODE_PATH=/usr/share/nodejs browserify /tmp/e.js > /dev/null
Error: Can't walk dependency graph: Cannot find module 'diff' from
'/usr/share/nodejs/sinon/lib/sinon/spy-formatters.js'
node-sinon depends on diff ^8.0.4 and that file requires it, so anything that
browserifies sinon fails at build time.
Either build dist/ in debian/rules, or drop the browser/unpkg fields, which
only mean something in the npm artifact.
Thanks,
Emfox Zhou
Technical Details
Message-ID:
<NTcm5-8qWi-3@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.szaf.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.szaf.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Wei Zhou <emfox@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1152358: node-diff: "browser" points at dist/, which never reaches the source tarball Date: Wed, 28 Oct 2026 15:00:01 +0100 Message-ID: <NTcm5-8qWi-3@gated-at.bofh.it> X-Original-To: submit@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Oct 28 13:55:08 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.7 Reply-To: Wei Zhou <emfox@debian.org>, 1152358@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: pkg-javascript-devel@lists.alioth.debian.org X-Debian-Pr-Message: report 1152358 X-Debian-Pr-Package: node-diff X-Debian-Pr-Source: node-diff X-Debian-User: emfox X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/1999368 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 25 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 28 Oct 2026 21:52:48 +0800 X-Original-Message-ID: <E1xM45A-00000001WH9-2KUG@emfox.rpwt.org>