I am using Nexus 3 as npm private repository. I have a project that requires some dependencies such as: @nodelib/fs.stat
, @mrmlnc/readdir-enhanced@^2.2.1
.
If I execute the following npm install commands everything works alright:
sudo npm install -g @nodelib/fs.stat
+ @nodelib/[email protected]
added 1 package in 0.481s
sudo npm install -g @mrmlnc/readdir-enhanced@^2.2.1
+ @mrmlnc/[email protected]
added 3 packages in 2.178s
But I have to configure .npmrc to reference my nexus npm repository this way:
~/.npmrc:
registry=http://mynexus.com/repository/npmrepo
Now when I try to install my private project npm install -g generator-myyeomangenerator
if fails because it can't download those dependencies.
In fact, now that I have set up my .npmrc config if I directly execute npm install for those dependencies I get a 404:
sudo npm install -g @nodelib/fs.stat
npm ERR! code E404
npm ERR! 404 Not Found: @nodelib/fs.stat@latest
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/myuser/.npm/_logs/2018-06-04T21_55_56_792Z-debug.log
The log file doesn't provide additional info.
Appart from those dependencies, running some other installs work ok event through the npm repo:
sudo npm install -g jav
+ [email protected]
added 71 packages in 9.628s
It seems to be related to the @ naming of the deps, here's another example of failing execution:
npm install -g @angular/[email protected]
npm ERR! code E404
npm ERR! 404 Not Found: @angular/[email protected]
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/myuser/.npm/_logs/2018-06-04T22_01_02_384Z-debug.log
How can I fix this?