[FIXED] bento-ng-d3 not found on registry.npmjs.org and some other bento packages as well, Angular

Issue

I have found the following dependency in my angular project package.json file.

"@bento/bento-ng":"8.4.1",
"@bento/bento-ng-d3":8.4.1,
"@bento/bento-ng-datamap":8.4.1,
"@bento/bento-ng-flexgrid-control":8.4.1,
"@bento/bento-ng-transferbox":8.4.1

Tried npm install, yarn install

but nothing helps out in installing these packages, I always get the same error

error: An unexpected error occured:
"https://registry.npmjs.org/@bento%2fbento-ng-d3: not found"

I tried to search https://www.npmjs.com/ and got the same error
0 package found.
Also, searched on jfrog artifactory but they are not available.

someone used these packages in the code repository but I can’t get them from anywhere what to do? what will be the optimum solution to get out of this problem, if somehow I got the packages it is good practice to keep them in my code?

Solution

First of all, version numbers must be between " marks: not 8.4.1, but "8.4.1".

On the other hand, the @bento packages are not published on npm, because it is not found on npm. @bento packages are probably in a private repository / artifactory.

If you have any access to an artifactory (like a company’s private network), you should create a .npmrc file in the same folder where the package.json file is. ".npmrc" file is a file without a name, "npmrc" is the extension of the file, be careful! In the .npmrc file you can define alternate download url and credentials of namespaced packages ("@bento" is a namespace). Content could be like:

Simple example (pull packages from official npm registry, except @bento packages):

registry=https://registry.npmjs.org/
@bento:registry=https://artifactory.com/other/url/segments

Advanced example (same as above, but contains credentials to the private artifactory):

registry=https://registry.npmjs.org/
@bento:registry=https://artifactory.com/other/url/segments
//artifactory.com/other/url/segments/:_password=fewljtoeJQOjeorQROLD
//artifactory.com/other/url/segments/:username=username
//artifactory.com/other/url/segments/:always-auth=true

Answered By – Pa Ri

Answer Checked By – Mildred Charles (Easybugfix Admin)

Leave a Reply

(*) Required, Your email will not be published