UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tarball' of undefined after 'npm install @fortawesome/fontawesome-svg-core'
See original GitHub issueDescribe the bug
When doing a npm install @fortawesome/fontawesome-svg-core
, verdaccio throws an
UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tarball' of undefined
at convertDistRemoteToLocalTarballUrls (/opt/verdaccio/build/lib/utils.js:209:89)
.
To Reproduce
Steps to reproduce the behavior:
- run latest verdaccio/verdaccio docker image
- set local npm to use verdaccio
npm install @fortawesome/fontawesome-svg-core
- verdaccio throws and crashes
- local npm times out with error
Expected behavior
verdaccio should be able to proxy/cache the @fortawesome/fontawesome-svg-core
package without crashing.
Docker || Kubernetes (please complete the following information):
- Docker verdaccio tag: latest
Configuration File (cat ~/.config/verdaccio/config.yaml)
storage: /verdaccio/storage/packages
plugins: /verdaccio/plugins
auth:
htpasswd:
file: /verdaccio/storage/htpasswd
security:
api:
jwt:
sign:
expiresIn: 60d
notBefore: 1
web:
sign:
expiresIn: 7d
notBefore: 1
uplinks:
npmjs:
url: https://registry.npmjs.org/
packages:
'@*/*':
access: $all
proxy: npmjs
storage: cached
'**':
access: $all
proxy: npmjs
storage: cached
middlewares:
audit:
enabled: true
logs:
- { type: stdout, format: pretty, level: http }
Environment information
Environment Info:
System:
OS: Linux 4.4 Alpine Linux undefined
CPU: (4) x64 Intel(R) Core(TM) i3-4130 CPU @ 3.40GHz
Binaries:
Node: 10.16.3 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.9.0 - /usr/local/bin/npm
Debugging output
2019-12-12T10:47:45.796372+01:00 | npm-registry_app_1 | http <-- 200, user: XXX(XXX via XXXX), req: 'GET /@fortawesome%2ffontawesome-svg-core', bytes: 0/0
2019-12-12T10:48:36.147890+01:00 | npm-registry_app_1 | (node:7) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tarball' of undefined
2019-12-12T10:48:36.147913+01:00 | npm-registry_app_1 | at convertDistRemoteToLocalTarballUrls (/opt/verdaccio/build/lib/utils.js:209:89)
2019-12-12T10:48:36.147920+01:00 | npm-registry_app_1 | at Object.getPackageMetaCallback [as callback] (/opt/verdaccio/build/api/endpoint/api/package.js:39:65)
2019-12-12T10:48:36.147924+01:00 | npm-registry_app_1 | at getPackageSynUpLinksCallback (/opt/verdaccio/build/lib/storage.js:336:17)
2019-12-12T10:48:36.147927+01:00 | npm-registry_app_1 | at self.localStorage.updateVersions (/opt/verdaccio/build/lib/storage.js:603:9)
2019-12-12T10:48:36.147930+01:00 | npm-registry_app_1 | at _readCreatePackage (/opt/verdaccio/build/lib/local-storage.js:210:9)
2019-12-12T10:48:36.147935+01:00 | npm-registry_app_1 | at storage.readPackage (/opt/verdaccio/build/lib/local-storage.js:712:7)
2019-12-12T10:48:36.147939+01:00 | npm-registry_app_1 | at _readStorageFile.then.res (/opt/verdaccio/node_modules/@verdaccio/local-storage/lib/local-fs.js:199:9)
2019-12-12T10:48:36.148398+01:00 | npm-registry_app_1 | (node:7) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
"Cannot read property 'match' of undefined" during Npm install
The problem that i call the nodejs VERSIONS HELL! (NOTE: after reflection! For npm it may not be a version HELL! READ TO...
Read more >Cannot read property 'url' of undefined when starting server.js ...
So to properly install the correct dependencies, go to the folder that contains server.js, nodejs.config.js, package.json. run: npm install npm ...
Read more >tar - npm
A "tar file" or "tarball" is an archive of file system entries (directories, files, links, etc.) The name comes from "tape archive". If...
Read more >Cannot read property .match of undefined - Heroku Help
Running an npm command, such as npm install or npm ci , may raise something like this: npm err TypeError: Cannot read property...
Read more >NPM - Cannot read property "match" of undefined
When trying to run an npm command, you can't install the packages, you may get the error: stephen... Tagged with npm, troubleshooting, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
manually removing the downloaded package from the verdaccio cache folder and re-downloading it helped for the moment, however, I think the checks / error handling mentioned above should be improved anyway so verdaccio doesn’t crash even if a package returns unexpected metadata. Maybe the metadata even got corrupted by verdaccio itself internally somehow… Currently, I cannot reproduce the error but will report back if it occurs again.
I’m closing this, too old, please if the error persist don’t hesitate to comment and provide more information 👍