You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use a private Gitlab registry to publish my packages. When I install a package that has optionalDependencies, they do not get installed. If I have a private package that contains os and cpu fields, it gets installed even if I'm not on the right platform.
Expected Behavior
The behavior should be the same as usual, which means installing the optionalDependencies and/or, in the case of a package with cpu and os fields specified, installing or not installing it on the platform (Windows/Linux) according to the fields specified in the package.json.
Steps To Reproduce
Let's say I have the following private package, @foo/bar, which contains private optionalDependencies @foo/bar.linux-x64 and @foo/bar.win32-x64 :
First point => If, in another project, I run npm i @foo/bar, @foo/bar installs correctly but the optionalDependencies do not. I don't get any info with --verbose, they simply are not GET.
Second point => If I install npm i @foo/bar.linux-x64 on a Windows platform, the package installs and I don't get any platform-related errors.
Environment
npm: 10.7.0
Node.js: 20.6.0
OS Name: Windows x64
npm config:
; "builtin" config from C:\Users\Boz\AppData\Roaming\npm\node_modules\npm\npmrcprefix = "C:\\Users\\Boz\\AppData\\Roaming\\npm"; "user" config from C:\Users\Boz\.npmrc
@foo:registry = "https://gitlab.com/api/v4/packages/npm/"
//gitlab.com/api/v4/packages/npm/:_authToken = (protected)
//registry.npmjs.org/:_authToken = (protected)
registry = "https://registry.npmjs.org/"; "project" config from C:\foo\bar\.npmrcpackage-lock = false
; node bin location = C:\Program Files\nodejs\node.exe; node version = v20.6.0; npm local prefix = C:\foo\bar; npm version = 10.7.0; cwd = C:\foo\bar; HOME = C:\Users\Boz; Run `npm config ls -l` to show all defaults.; "publishConfig" from C:\foo\bar\package.json; This set of config values will be used at publish-time.
@foo:registry = "https://private-registry.com/"
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
I use a private Gitlab registry to publish my packages. When I install a package that has optionalDependencies, they do not get installed. If I have a private package that contains os and cpu fields, it gets installed even if I'm not on the right platform.
Expected Behavior
The behavior should be the same as usual, which means installing the optionalDependencies and/or, in the case of a package with cpu and os fields specified, installing or not installing it on the platform (Windows/Linux) according to the fields specified in the package.json.
Steps To Reproduce
Let's say I have the following private package,
@foo/bar
, which contains private optionalDependencies@foo/bar.linux-x64
and@foo/bar.win32-x64
:First point => If, in another project, I run
npm i @foo/bar
,@foo/bar
installs correctly but the optionalDependencies do not. I don't get any info with--verbose
, they simply are not GET.Second point => If I install
npm i @foo/bar.linux-x64
on a Windows platform, the package installs and I don't get any platform-related errors.Environment
The text was updated successfully, but these errors were encountered: