title: npm publish fails with "The "path" argument must be of type string. Received undefined"
body: <p>I have a project that i publish on a private npm repository.
  Under <code>node v14.16.0 (npm v6.14.11)</code>, the command <code>npm publish</code> run well and my package is published on my private repository.</p>
  <p>I upgraded npm to 7 to support peer dependencies installation.
  Now under <code>node v15.12.0 (npm v7.6.3)</code>, the command <code>npm publish</code> fails with</p>
  <blockquote>
  <p>The &quot;path&quot; argument must be of type string. Received undefined</p>
  </blockquote>
  <p>Any idea?</p>
  <p><strong>Update</strong></p>
  <p>npm 7.6.3 with node 14 as the same effect :</p>
  <blockquote>
  <p>The &quot;path&quot; argument must be of type string</p>
  </blockquote>
  <p><strong>Update 2</strong></p>
  <p>console output with flag <code>--verbose</code></p>
  <blockquote>
  <p>npm verb cli [ npm verb cli<br />
  '.nvm/versions/node/v15.12.0/bin/node', npm
  verb cli<br />
  '.nvm/versions/node/v15.12.0/bin/npm', npm verb
  cli   'publish', npm verb cli   '--verbose' npm verb cli ] npm info
  using npm@7.6.3 npm info using node@v15.12.0 npm timing
  config:load:defaults Completed in 3ms npm timing
  config:load:file:.nvm/versions/node/v15.12.0/lib/node_modules/npm/npmrc
  Completed in 2ms npm timing config:load:builtin Completed in 2ms npm
  timing config:load:cli Completed in 2ms npm timing config:load:env
  Completed in 0ms npm timing
  config:load:file:MyProject/.npmrc
  Completed in 4ms npm timing config:load:project Completed in 5ms npm
  timing config:load:file:.npmrc Completed in 4ms
  npm timing config:load:user Completed in 4ms npm timing
  config:load:file:.nvm/versions/node/v15.12.0/etc/npmrc
  Completed in 1ms npm timing config:load:global Completed in 1ms npm
  timing config:load:cafile Completed in 0ms npm timing
  config:load:validate Completed in 0ms npm timing
  config:load:setUserAgent Completed in 1ms npm timing
  config:load:setEnvs Completed in 0ms npm timing config:load Completed
  in 18ms npm verb npm-session 83e5ee6d9b1b9659 npm timing npm:load
  Completed in 82ms npm verb publish [ '.' ] npm timing command:publish
  Completed in 25ms npm verb stack TypeError [ERR_INVALID_ARG_TYPE]: The
  &quot;path&quot; argument must be of type string. Received undefined npm verb
  stack     at new NodeError (node:internal/errors:329:5) npm verb stack
  at validateString (node:internal/validators:129:11) npm verb stack<br />
  at join (node:path:1081:7) npm verb stack     at flatten
  (.nvm/versions/node/v15.12.0/lib/node_modules/npm/lib/utils/flat-options.js:50:10)
  npm verb stack     at Publish.publishConfigToOpts
  (.nvm/versions/node/v15.12.0/lib/node_modules/npm/lib/publish.js:140:12)
  npm verb stack     at Publish.publish
  (.nvm/versions/node/v15.12.0/lib/node_modules/npm/lib/publish.js:58:32)</p>
  </blockquote>