npm ci fails when using file: dependencies

What I Wanted to Do

with a set of JavaScript modules as below

  • shared -> “dependencies”: { “ANY-PACKAGE-HOSTED-ON-NPM”: “ANY-VERSION” }
  • a -> “dependencies”: {“shared”: “file:…/shared” }
  • b -> “dependencies”: {“shared”: “file:…/shared” }

on a (works as expected):
npm ci
on b (breaks)
npm ci

What Happened Instead

when running the below on b after running on a

npm ci

you get: “error ANY-PACKAGE-HOSTED-ON-NPM not accessible from shared”

Reproduction Steps

cd a
npm ci
cd …/b
npm ci

Details

npm-debug.log file:

0 info it worked if it ends with ok
1 verbose cli [ ‘C:\dev\software\nodejs\node.exe’,
1 verbose cli ‘C:\dev\software\nodejs\node_modules\npm\bin\npm-cli.js’,
1 verbose cli ‘ci’ ]
2 info using npm@6.9.0
3 info using node@v10.16.0
4 verbose npm-session 7a64852354050880
5 info prepare initializing installer
6 verbose prepare starting workers
7 verbose prepare installation prefix: C:\dev\learning\npm\a
8 verbose prepare using package-lock.json
9 warn prepare removing existing node_modules/ before installation
10 verbose checkLock verifying package-lock data
11 verbose teardown shutting down workers.
12 info teardown Done in 0s
13 verbose stack Error: pino not accessible from shared
13 verbose stack at reqAddr (C:\dev\software\nodejs\node_modules\npm\node_modules\npm-logical-tree\index.js:159:17)
13 verbose stack at Object.keys.forEach.name (C:\dev\software\nodejs\node_modules\npm\node_modules\npm-logical-tree\index.js:129:22)
13 verbose stack at Array.forEach ()
13 verbose stack at addChild (C:\dev\software\nodejs\node_modules\npm\node_modules\npm-logical-tree\index.js:128:40)
13 verbose stack at Array.from.forEach.name (C:\dev\software\nodejs\node_modules\npm\node_modules\npm-logical-tree\index.js:113:5)
13 verbose stack at Array.forEach ()
13 verbose stack at lockTree (C:\dev\software\nodejs\node_modules\npm\node_modules\npm-logical-tree\index.js:107:5)
13 verbose stack at then.then.then.then (C:\dev\software\nodejs\node_modules\npm\node_modules\libcipm\index.js:163:21)
14 verbose cwd C:\dev\learning\npm\a
15 verbose Windows_NT 10.0.14393
16 verbose argv “C:\dev\software\nodejs\node.exe” “C:\dev\software\nodejs\node_modules\npm\bin\npm-cli.js” “ci”
17 verbose node v10.16.0
18 verbose npm v6.9.0
19 error pino not accessible from shared
20 verbose exit [ 1, true ]

Platform Info

$ npm --versions
{ a: '1.0.0',
  npm: '6.9.0',
  ares: '1.15.0',
  brotli: '1.0.7',
  cldr: '35.1',
  http_parser: '2.8.0',
  icu: '64.2',
  modules: '64',
  napi: '4',
  nghttp2: '1.34.0',
  node: '10.16.0',
  openssl: '1.1.1b',
  tz: '2019a',
  unicode: '12.1',
  uv: '1.28.0',
  v8: '6.8.275.32-node.52',
  zlib: '1.2.11' }
$ node -p process.platform
win32

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