npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

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

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.


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: '',
  zlib: '1.2.11' }
$ node -p process.platform

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: