Angular.js: Bad name in package.json: conflict with existing npm package

Created on 24 Dec 2018  路  4Comments  路  Source: angular/angular.js

I'm submitting a ...

  • [ x ] bug report
  • [ ] feature request
  • [ ] other

Current behavior:

The name of the package provided in package.json is wrong.

In the last version of package.json on master: https://github.com/angular/angular.js/blob/master/package.json

{ "name": "angularjs", "license": "MIT", "branchVersion": "^1.7.0", "branchPattern": "1.7.*", ... }

But in fact angularjs package on npm is linked to this repository eugeneware/angularjs.
The good news is that the eugeneware/angularjs seems to be abandoned.

Expected / new behavior:

You need to change the name attribute in package.json to angular.

Minimal reproduction of the problem with instructions:

$ npm install angularjs

Output:

npm WARN saveError ENOENT: no such file or directory, open '/Users/alahaxe/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/alahaxe/package.json'
npm WARN alahaxe No description
npm WARN alahaxe No repository field.
npm WARN alahaxe No README data
npm WARN alahaxe No license field.

+ [email protected]
added 1 package from 1 contributor and audited 1 package in 1.711s
found 0 vulnerabilities

AngularJS version: 1.x.y

All versions

Browser: Not relevant

Anything else:

No

Most helpful comment

Done 馃敟

All 4 comments

It's propably a good idea to keep it in-sync with the name it's being published from on npm idd.

However, what made you try running npm install angularjs in the first place? I'm not sure there realy is a conflicting issue, aslong as you're aware you need to run npm install angular (which is, afaik, what's in the docs).

@gkalpak Is there any reasoning behind this? Is it related to the naming confusing between angularjs and angular?

Looks like it was last modified by @vojtajina https://github.com/angular/angular.js/commit/32f8a04c8f3eb480b3f405ac6b1324c96025b2fc

Hello @frederikprijck,

In fact I discovered this totally by accident.
I was working on a side project (not even an alpha version for the moment) that aggregate all informations I can gather on a project hosted on github on many providers like travis, npm, packagist, coveralls... When I try to analyse angular js repository (https://digger.outweb.eu/#!/p/angular/angular.js) I thought I had an issue on npm package detection.

I found quite disturbing to have a different name in npm registry and in the repository.

No, it is not related to the AngularJS-vs-Angular naming guidelines (since it predates Angular) and I am not aware of the reasoning. Maybe @petebacondarwin knows.

In any case, I think this is worth fixing (since it is very straight forward to fix and can be misleading as it is now).
@lahaxearnaud or @frederikprijck, feel free to submit a PR :wink:

Done 馃敟

Was this page helpful?
0 / 5 - 0 ratings