@jhecking wrote:
What I Wanted to Do
Install a package that has local dependencies (i.e. “file:…”).
What Happened Instead
I get an error message that transitive dependency of the local dependency cannot be installed:
ENOENT: no such file or directory, rename ‘/XYZ/npm-install-local-dependency-bug/examples/node_modules/.staging/npm-install-local-dependency-bug-f307b53e/node_modules/acorn’ -> ‘/XYZ/npm-install-local-dependency-bug/examples/node_modules/.staging/acorn-af0fc6c4’
Reproduction Steps
$ git clone https://github.com/jhecking/npm-install-local-dependency-bug.git . Cloning into '.'... remote: Counting objects: 7, done. remote: Compressing objects: 100% (5/5), done. remote: Total 7 (delta 2), reused 7 (delta 2), pack-reused 0 Unpacking objects: 100% (7/7), done. $ cat package.json { "name": "npm-install-local-dependency-bug", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "devDependencies": { "standard": "^11.0" } } $ npm install npm WARN npm-install-local-dependency-bug@1.0.0 No description npm WARN npm-install-local-dependency-bug@1.0.0 No repository field. added 214 packages from 173 contributors and audited 374 packages in 2.304s found 0 vulnerabilities $ cd examples/ $ cat package.json { "name": "examples", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "npm-install-local-dependency-bug": "file:.." } } $ npm install npm WARN examples@1.0.0 No description npm WARN examples@1.0.0 No repository field. npm ERR! path /XYZ/npm-install-local-dependency-bug/examples/node_modules/.staging/npm-install-local-dependency-bug-f307b53e/node_modules/acorn npm ERR! code ENOENT npm ERR! errno -2 npm ERR! syscall rename npm ERR! enoent ENOENT: no such file or directory, rename '/XYZ/npm-install-local-dependency-bug/examples/node_modules/.staging/npm-install-local-dependency-bug-f307b53e/node_modules/acorn' -> '/XYZ/npm-install-local-dependency-bug/examples/node_modules/.staging/acorn-af0fc6c4' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /Users/jhecking/.npm/_logs/2018-07-20T04_01_29_488Z-debug.log
Details
2018-07-20T04_01_29_488Z-debug.log (21.0 KB)
Platform Info
$ npm --versions { examples: '1.0.0', npm: '6.2.0', ares: '1.14.0', cldr: '33.0', http_parser: '2.8.0', icu: '61.1', modules: '64', napi: '3', nghttp2: '1.32.0', node: '10.6.0', openssl: '1.1.0h', tz: '2018c', unicode: '10.0', uv: '1.21.0', v8: '6.7.288.46-node.13', zlib: '1.2.11' } $ node -p process.platform darwin
Posts: 29
Participants: 18