npm (v6.8.0) pack/publish not bundling folders named "core"

What I Wanted to Do

When running npm publish, I expect the CLI to publish the entirety of my project, which included a folder named “core”.

What Happened Instead

Running npm publish will not include folders named core within the final tarball. The folder is not npm ignored nor is it being ignored within package.json

Reproduction Steps

Step 0: Ensure we’re using npm version 6.8.0

Step 1: Clone my repo with the initial bootstrap of all the files. It’s a fresh project with 0 dependencies.

git clone git@github.com:xdrdak/npm6.8.0-core-folder-bug.git

Step 2: Simply attempt to pack the project

npm pack

Step 3: Check the tarball content and notice how anything contained within a folder named core is not packaged.

Details

Using npm version 6.8.0

Platform Info

$ npm --versions
{ test: '1.0.0',
  npm: '6.8.0',
  ares: '1.14.0',
  cldr: '33.1',
  http_parser: '2.8.0',
  icu: '62.1',
  modules: '64',
  napi: '3',
  nghttp2: '1.32.0',
  node: '10.9.0',
  openssl: '1.1.0i',
  tz: '2018e',
  unicode: '11.0',
  uv: '1.22.0',
  v8: '6.8.275.24-node.14',
  zlib: '1.2.11' }
$ node -p process.platform
darwin

You have identified the key issue, folders named core are left out of tarball by npm@6.8.0. The canonical thread for this issue is: npm pack leaving out files (6.8.0 only)

This is fixed in npm@6.9.0 and you can test it in the pre-release:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.