Closed vjpr closed 6 years ago
Downgrading to 1.39.0
works.
I can't reproduce it with pnpm install/pnpm recursive install on what package does it fail?
This might be fixed in v1.41.0
This might be fixed in v1.41.0
Nope, didn't fix it.
I will find the exact line that is causing it. Its happening on a remote Ubuntu machine.
Error at 339.
It seems its possible for pkg
to be undefined
.
Perhaps its because I'm not returning from the readPackage
hook in a pnpmfile.js
somewhere....but I don't use a pnpmfile
in this project.
If I add console.log('pkg', pkg, options)
I am seeing 6 packages where pkg
is undefined before it fails.
pkg undefined { currentDepth: 0,
hasManifestInShrinkwrap: false,
keypath: [],
parentIsInstallable: undefined,
parentNodeId: '>/>',
proceed: false,
readPackageHook: undefined,
reinstallForFlatten: undefined,
shamefullyFlatten: false,
sideEffectsCache: false,
update: false,
depPath: 'registry.npmjs.org/co/4.6.0',
dependencyShrinkwrap: { resolution: { integrity: 'sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=' } },
optionalDependencyNames: [],
pkgId: 'registry.npmjs.org/co/4.6.0',
relDepPath: '/co/4.6.0',
resolvedDependencies: {},
shrinkwrapResolution:
{ integrity: 'sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=',
registry: 'https://registry.npmjs.org/',
tarball: 'https://registry.npmjs.org/co/-/co-4.6.0.tgz' } }
pkg undefined { currentDepth: 0,
hasManifestInShrinkwrap: false,
keypath: [],
parentIsInstallable: undefined,
parentNodeId: '>/>',
proceed: false,
readPackageHook: undefined,
reinstallForFlatten: undefined,
shamefullyFlatten: false,
sideEffectsCache: false,
update: false,
depPath: 'registry.npmjs.org/debug/2.2.0',
dependencyShrinkwrap:
{ dependencies: { ms: '0.7.1' },
resolution: { integrity: 'sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=' } },
optionalDependencyNames: [],
pkgId: 'registry.npmjs.org/debug/2.2.0',
relDepPath: '/debug/2.2.0',
resolvedDependencies: { ms: '0.7.1' },
shrinkwrapResolution:
{ integrity: 'sha1-+HBX6ZWxofauaklgZkE3vFbwOdo=',
registry: 'https://registry.npmjs.org/',
tarball: 'https://registry.npmjs.org/debug/-/debug-2.2.0.tgz' } }
pkg undefined { currentDepth: 0,
hasManifestInShrinkwrap: false,
keypath: [],
parentIsInstallable: undefined,
parentNodeId: '>/>',
proceed: false,
readPackageHook: undefined,
reinstallForFlatten: undefined,
shamefullyFlatten: false,
sideEffectsCache: false,
update: false,
depPath: 'registry.npmjs.org/koa-convert/1.2.0',
dependencyShrinkwrap:
{ dependencies: { co: '4.6.0', 'koa-compose': '3.2.1' },
resolution: { integrity: 'sha1-2kCHXfSd4FOQmNFwC1CCDOvNIdA=' } },
optionalDependencyNames: [],
pkgId: 'registry.npmjs.org/koa-convert/1.2.0',
relDepPath: '/koa-convert/1.2.0',
resolvedDependencies: { co: '4.6.0', 'koa-compose': '3.2.1' },
shrinkwrapResolution:
{ integrity: 'sha1-2kCHXfSd4FOQmNFwC1CCDOvNIdA=',
registry: 'https://registry.npmjs.org/',
tarball: 'https://registry.npmjs.org/koa-convert/-/koa-convert-1.2.0.tgz' } }
pkg undefined { currentDepth: 0,
hasManifestInShrinkwrap: false,
keypath: [],
parentIsInstallable: undefined,
parentNodeId: '>/>',
proceed: false,
readPackageHook: undefined,
reinstallForFlatten: undefined,
shamefullyFlatten: false,
sideEffectsCache: false,
update: false,
depPath: 'registry.npmjs.org/minimist/1.2.0',
dependencyShrinkwrap: { resolution: { integrity: 'sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=' } },
optionalDependencyNames: [],
pkgId: 'registry.npmjs.org/minimist/1.2.0',
relDepPath: '/minimist/1.2.0',
resolvedDependencies: {},
shrinkwrapResolution:
{ integrity: 'sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=',
registry: 'https://registry.npmjs.org/',
tarball: 'https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz' } }
pkg undefined { currentDepth: 0,
hasManifestInShrinkwrap: false,
keypath: [],
parentIsInstallable: undefined,
parentNodeId: '>/>',
proceed: false,
readPackageHook: undefined,
reinstallForFlatten: undefined,
shamefullyFlatten: false,
sideEffectsCache: false,
update: false,
depPath: 'registry.npmjs.org/through/2.3.8',
dependencyShrinkwrap: { resolution: { integrity: 'sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=' } },
optionalDependencyNames: [],
pkgId: 'registry.npmjs.org/through/2.3.8',
relDepPath: '/through/2.3.8',
resolvedDependencies: {},
shrinkwrapResolution:
{ integrity: 'sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=',
registry: 'https://registry.npmjs.org/',
tarball: 'https://registry.npmjs.org/through/-/through-2.3.8.tgz' } }
pkg undefined { currentDepth: 0,
hasManifestInShrinkwrap: false,
keypath: [],
parentIsInstallable: undefined,
parentNodeId: '>/>',
proceed: false,
readPackageHook: undefined,
reinstallForFlatten: undefined,
shamefullyFlatten: false,
sideEffectsCache: false,
update: false,
depPath: 'registry.npmjs.org/underscore/1.8.3',
dependencyShrinkwrap: { resolution: { integrity: 'sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=' } },
optionalDependencyNames: [],
pkgId: 'registry.npmjs.org/underscore/1.8.3',
relDepPath: '/underscore/1.8.3',
resolvedDependencies: {},
shrinkwrapResolution:
{ integrity: 'sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=',
registry: 'https://registry.npmjs.org/',
So it seems that pkgResponse.manifest
is undefined
and pkgResponse.fetchingManifest
is also undefined
when it fails.
~I am behind a corporate proxy here where it seemed like it was messing with requests somehow - perhaps rate-limiting or something.~
Also happens locally on macOS.
Here's an example of the pkgResponse
object:
resp { body:
{ cacheByEngine: Map {},
id: 'registry.npmjs.org/underscore/1.8.3',
inStoreLocation: '/home/vagrant/.pnpm-store/2/registry.npmjs.org/underscore/1.8.3',
isLocal: false,
latest: undefined,
normalizedPref: undefined,
resolution:
{ integrity: 'sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=',
registry: 'https://registry.npmjs.org/',
tarball: 'https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz' },
updated: false },
fetchingFiles: Promise { { filenames: [Array], fromStore: true } },
fetchingManifest: undefined,
So must be an issue in package-requester#requestPackage
I guess https://github.com/pnpm/package-requester/blob/df3380f4c1d90457eae536bf9f4e0eb7d41f1eac/src/packageRequester.ts
I can gather more info for you if you tell me where to place some console.log
statements - because I think it will be hard to reproduce.
I reproduced the issue with a unit test
:ship: pnpm@1.41.1
When run with
lerna bootstrap --concurrency=1
.Also happens with
pnpm recursive install
.pnpm version: 1.40.2
Additional information:
node -v
prints: 8.1.2