install-peerdeps
install-peerdeps copied to clipboard
Cannot read property 'forEach' of undefined
Running something like install-peerdeps -d postcss@^8.1.0
just gives me this output:
install-peerdeps v3.0.3
ERR Cannot read property 'forEach' of undefined
Can you share your operating system and Node/NPM version (node -v
, npm -v
)?
macOS: 11.2.3 (20D91) Node: v14.16.0 npm: 6.14.11
It appears that PostCSS ^8.1.0
doesn't have any peer dependencies: https://github.com/postcss/postcss/blob/8.1.14/package.json, so I think the error is being thrown because the peer dependency array is undefined
.
The error message needs to be better, so will keep this open.
Does there need to be an error in that case? If there’s no peer deps, then this module can nearly install the package requested and it’s done.
Does there need to be an error in that case? If there’s no peer deps, then this module can nearly install the package requested and it’s done.
That's a good point -- maybe just a warning/info message since I'm guessing users who use install-peerdeps
are generally intending/expecting extra peer deps to be installed?
That seems reasonable.
install-peerdeps version: 3.0.3
so... is this ever happening? the error is still there. sorry for a bit of necro, but it's kinda necessary