I have a project that i publish on a private npm repository.
Under node v14.16.0 (npm v6.14.11)
, the command npm publish
run well and my package is published on my private repository.
I upgraded npm to 7 to support peer dependencies installation.
Now under node v15.12.0 (npm v7.6.3)
, the command npm publish
fails with
The "path" argument must be of type string. Received undefined
Any idea?
Update
npm 7.6.3 with node 14 as the same effect :
The "path" argument must be of type string
Update 2
console output with flag --verbose
npm verb cli [ npm verb cli
'.nvm/versions/node/v15.12.0/bin/node', npm verb cli
'.nvm/versions/node/v15.12.0/bin/npm', npm verb cli 'publish', npm verb cli '--verbose' npm verb cli ] npm info using [email protected] npm info using [email protected] 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 "path" 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
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)
The "path" argument must be of type string
– Forsakenpm publish --verbose
? – Hawaiian