rollpkg icon indicating copy to clipboard operation
rollpkg copied to clipboard

Bundlephobia Error: InstallError

Open LucaBlackDragon opened this issue 3 years ago • 4 comments

I'm hitting this error building a TS library:

InstallError: InstallError
    at Object.installPackage (C:\Users\myuser\mylib\node_modules\package-build-stats\build\utils\installation.utils.js:140:15)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.getPackageStats (C:\Users\myuser\mylib\node_modules\package-build-stats\build\getPackageStats.js:78:5)
    at async Object.calculateBundlephobiaStats (C:\Users\myuser\mylib\node_modules\rollpkg\dist\bundlephobiaStats.js:35:30)
    at async Object.progressEstimator (C:\Users\myuser\mylib\node_modules\progress-estimator\src\logger.js:58:27)
    at async rollpkg (C:\Users\myuser\mylib\node_modules\rollpkg\dist\cli.js:164:13) {
  originalError: 'tail: invalid option -- 1\r\n' +
    "Try `tail --help' for more information.\r\n" +
    'npm ERR! code EINVALIDTAGNAME\n' +
    'npm ERR! Invalid tag name "$(npm": Tags may not have any characters that encodeURIComponent encodes.\n' +
    '\n' +
    'npm ERR! A complete log of this run can be found in:\n' +
    'npm ERR!     C:\\Users\\l.nardi\\scoop\\persist\\nodejs-lts\\cache\\_logs\\2021-12-29T09_37_57_618Z-debug-0.log\n',
  extra: undefined
}

The offending line ("tail: invalid option -- 1") looks to be this one in the package-build-stats library.

What do you think? Should I open an issue there?

LucaBlackDragon avatar Dec 29 '21 09:12 LucaBlackDragon

Yeah that looks like an upstream error. Please open an issue with package-build-stats. Also, what version of node and npm are you using? I'm using node v14.17 and npm v7.12 and I haven't hit this error.

rafgraph avatar Dec 29 '21 16:12 rafgraph

Sorry I forgot to mention that: node v16.13.1 (LTS) npm v8.3.0 Anyway, I'll open an issue on package-build-stats, thanks!

LucaBlackDragon avatar Jan 10 '22 08:01 LucaBlackDragon

I think the node/npm version is causing it, which is unfortunate because you're using LTS. It doesn't look like package-build-stats is maintained too often, so I'll have to remove it from rollpkg if it's not fixed because it should work with LTS.

I'm going to reopen this issue in case other people get this error. If you could link to the package-build-stats issue here that would be great, thanks.

rafgraph avatar Jan 10 '22 14:01 rafgraph

@rafgraph issue opened

LucaBlackDragon avatar Jan 17 '22 17:01 LucaBlackDragon