Unable to install sub npm dependencies for a pvt npm module

128 Views Asked by At

I have an npm private repo through sinopia I have published an app in this. It is a full end-to-end application using Angular2 on the UI side. It has its own dependencies mentioned in package.json such as @angular/core, animations etc.

When I install this pvt module, I am getting an error where it is unable to install sub-dependencies, i.e. dependencies which are part of pvt module.

Screenshot of the error:

enter image description here

2

There are 2 best solutions below

3
On BEST ANSWER

It's looking for dependencies which are not global but that are in your private repository. You should change the configuration to allow download of these dependencies from the global npm repository. Add this configuration to .npmrc file

 @angular:registry=registry.npmjs.org 
0
On

The following is just workaround to skip sinopia which is not optimal.

@angular:registry=registry.npmjs.org 

Sinopia does not support scope packages by default unless you update to the configuration file with

packages:
  '@*/*':
    # scoped packages
    access: $all
    allow_access: $all
    allow_publish: $authenticated
    publish: $authenticated

Anyway. I'll recommend instead use sinopia moves to sinopia's fork verdaccio which scope packages support is built-in.

http://www.verdaccio.org/docs/en/packages.html