long.js: 404 Not Found: @xtuc/long@4.2.1

env: node v8.9.4 npm 6.4.1 yarn 1.6.0

webpack4 depends on this package, but npm i /yarn install failed with ‘Maximum call stack size exceeded’ error.

npm error log

7022 http fetch GET 404 https://registry.npmjs.org/@xtuc%2flong 898ms
7023 silly fetchPackageMetaData error for @xtuc/long@4.2.1 404 Not Found: @xtuc/long@4.2.1
7024 verbose stack RangeError: Maximum call stack size exceeded
7024 verbose stack     at RegExp.test (<anonymous>)
7024 verbose stack     at isDepOptional (/usr/local/lib/node_modules/npm/lib/install/deps.js:398:27)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:414:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7024 verbose stack     at failedDependency (/usr/local/lib/node_modules/npm/lib/install/deps.js:430:9)
7025 verbose cwd /Users/lbp/projects/htc/router5
7026 verbose Darwin 17.4.0
7027 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
7028 verbose node v8.9.4
7029 verbose npm  v6.4.1
7030 error Maximum call stack size exceeded
7031 verbose exit [ 1, true ]

yarn error log

Trace: 
  Error: https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.1.tgz: Request failed "404 Not Found"
      at ResponseError.ExtendableBuiltin (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:212:66)
      at new ResponseError (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:318:124)
      at Request.<anonymous> (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:61933:26)
      at emitOne (events.js:116:13)
      at Request.emit (events.js:211:7)
      at Request.module.exports.Request.onRequestResponse (/usr/local/Cellar/yarn/1.6.0/libexec/lib/cli.js:134041:10)
      at emitOne (events.js:116:13)
      at ClientRequest.emit (events.js:211:7)
      at HTTPParser.parserOnIncomingClient (_http_client.js:551:21)
      at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 7
  • Comments: 20 (1 by maintainers)

Most upvoted comments

If I comment out the _auth setting in my npmrc, the install works fine. Otherwise I get the 404 and “Maximum call stack size exceeded”

I have the same issue

running in empty folder:

➜  sandbox npm i @xtuc/long --verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/local/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'i',
npm verb cli   '@xtuc/long',
npm verb cli   '--verbose' ]
npm info using npm@6.4.1
npm info using node@v10.11.0
npm verb npm-session c989b76e44eddcb6
npm http fetch GET 404 https://registry.npmjs.org/@xtuc%2flong 1179ms
npm timing stage:rollbackFailedOptional Completed in 1ms
npm timing stage:runTopLevelLifecycles Completed in 1352ms
npm verb stack Error: 404 Not Found: @xtuc/long@latest
npm verb stack     at fetch.then.res (/usr/local/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/fetch.js:42:19)
npm verb stack     at tryCatcher (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
npm verb stack     at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:512:31)
npm verb stack     at Promise._settlePromise (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:569:18)
npm verb stack     at Promise._settlePromise0 (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:614:10)
npm verb stack     at Promise._settlePromises (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:693:18)
npm verb stack     at Async._drainQueue (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:133:16)
npm verb stack     at Async._drainQueues (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:143:10)
npm verb stack     at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
npm verb stack     at runCallback (timers.js:694:18)
npm verb stack     at tryOnImmediate (timers.js:665:5)
npm verb stack     at processImmediate (timers.js:647:5)
npm verb cwd /Users/niewiemek/Projects/sandbox
npm verb Darwin 18.0.0
npm verb argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "@xtuc/long" "--verbose"
npm verb node v10.11.0
npm verb npm  v6.4.1
npm ERR! code E404
npm ERR! 404 Not Found: @xtuc/long@latest
npm verb exit [ 1, true ]
npm timing npm Completed in 1624ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/niewiemek/.npm/_logs/2018-11-08T11_25_51_264Z-debug.log
➜  sandbox pwd
/Users/niewiemek/Projects/sandbox

Indeed there is a workaround of removing the .npmrc file:

➜  sandbox mv ~/.npmrc ~/.npmrc_bak
➜  sandbox npm i @xtuc/long
npm WARN saveError ENOENT: no such file or directory, open '/Users/niewiemek/Projects/sandbox/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/niewiemek/Projects/sandbox/package.json'
npm WARN sandbox No description
npm WARN sandbox No repository field.
npm WARN sandbox No README data
npm WARN sandbox No license field.

+ @xtuc/long@4.2.1
added 1 package from 1 contributor and audited 1 package in 2.702s
found 0 vulnerabilities

However this workaround is not acceptable, if one needs to have this file (i.e. using organization npm registry with internal packages).

Can this get some attention, removing the npmrc is a not an option, need to use private registries

It worked for me so far by keeping older version of webpack. I ran npm cache clean --force before and use "webpack": "4.17.1"