npm Community Forum (Archive)

The npm community forum has been discontinued.

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

ENOTEMPTY: directory not empty, rename ... on nodejs 6 only

The node-rfc@next package installation fails with nodejs version 6, with “ENOTEMPTY: directory not empty…” error.

It works with nodejs 8 and 10 and the behaviour is the same on Windows and Linux platform.

To reproduce:

mkdir test
cd test
npm init # confirm defaults
npm install --verbose --save node-rfc@next

npm-debug.log (145.7 KB)

Platform Info

$ npm --versions
{ test: '1.0.0',
  npm: '3.10.10',
  ares: '1.10.1-DEV',
  http_parser: '2.8.0',
  icu: '58.2',
  modules: '48',
  napi: '3',
  node: '6.14.3',
  openssl: '1.0.2o',
  uv: '1.16.1',
  v8: '',
  zlib: '1.2.11' }
$ node -p process.platform
linux # or win32

We don’t really provide support for npm@3 anymore. Please upgrade and file a new issue (while keeping the template) if you can still reproduce it after upgrading to the latest npm version.

Thanks, can confirm the npm upgrade solved the issue.

Adding engines.npm > 3 in my package.json, in addition to engines.node, should fix this issue by node 6.x users, correct?

Is there npm support plan published somewhere, something like ?

We support the latest version of npm, and that’s it. In critical situations, we negotiate with the Node project to potentially backport patches or find alternative solutions for versions of npm being shipped with currently-maintained Node versions (and I do mean critical – something being completely, universally broken; dangerous security issues; etc).

Thanks for the clarification. It seems I need npm@latest added under peerDependency or engines section of my package.json. Is there any advantage of using one or another in this case? Both can only produce the warning, which is fine for me.