ERROR 'node_modules/.staging/eslint-e7cf6846' -> 'node_modules/eslint'

What I Wanted to Do

CI job: https://travis-ci.org/mysticatea/eslint-plugin-node/builds/527233243

$ npm i
$ npm i --no-save async
$ npm i --no-save eslint@5
....
ENOENT: no such file or directory, rename '/home/travis/build/mysticatea/eslint-plugin-node/node_modules/.staging/eslint-e7cf6846' -> '/home/travis/build/mysticatea/eslint-plugin-node/node_modules/eslint'

What Happened Instead

Installing failed as failed to rename an internal directory node_modules/.staging/eslint-e7cf6846.
I have redone that job some times, but it has reproduced 100%.

Reproduction Steps

This is what the CI job did:

git clone https://github.com/mysticatea/eslint-plugin-node.git
cd eslint-plugin-node
npm install
npm i --no-save async
npm i --no-save eslint@5

Details

Platform Info

CI job is with npm 5.6.0, 6.4.1, and 6.9.0.
CI job is on Linux, Mac, and Windows.

Also, it reproduced on my PC:

$ npm --versions
{
  'eslint-plugin-node': '8.0.1',
  npm: '6.9.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',
  icu: '64.2',
  llhttp: '1.1.1',
  modules: '72',
  napi: '4',
  nghttp2: '1.38.0',
  node: '12.1.0',
  openssl: '1.1.1b',
  tz: '2019a',
  unicode: '12.1',
  uv: '1.28.0',
  v8: '7.4.288.21-node.16',
  zlib: '1.2.11'
}
$ node -p process.platform
win32

(Reports to #bugs should follow the template, but easy to miss the template if you change the category after starting. Reports to #support are more freeform and I have moved your issue there.)

I reproduced your problem (on Mac), have not worked out the issue, but did stumble on a work-around:

$ git clone https://github.com/mysticatea/eslint-plugin-node.git
$ cd eslint-plugin-node
$ npm install
$ npm i --no-save async
$ npm i --no-save eslint@5
$ npx --no-install eslint --version
not found: eslint
$ npm i --no-save eslint@5
$ npx --no-install eslint --version
v5.16.0

Hi. Thank you for the pointing about template. I have overlooked it because I changed the category to #bugs (from #support) when I had confirmed that it reproduced 100%.

I filled the template.

2 Likes

To prevent auto closing.