Skip to content
This repository was archived by the owner on Jul 10, 2018. It is now read-only.
This repository was archived by the owner on Jul 10, 2018. It is now read-only.

npmjs.org always assumes that all dependencies are on npmjs.org and ends up linking to unrelated packages. #448

Description

@EdOverflow

Link to the page

https://www.npmjs.com/package/fec-style

Logged in or logged out?

Both work

Expected behavior

The dependencies tab should refer to the GitHub repository as defined in fec-style's package.json file.

Actual behavior

The accessible-mega-menu dependency in fec-style refers to my package on npmjs.org (https://www.npmjs.com/package/accessible-mega-menu), but in reality the package.json file points to a completely unrelated project.

$ npm view fec-style dependencies | head -2
 
{ 'accessible-mega-menu': 'git+https://github.com/noahmanger/Accessible-Mega-Menu.git',

npmjs.org appears to always assume that a dependency is on the NPM registry.

Steps to reproduce the problem

  1. Create a new Node module;
  2. In the package.json file, set some random dependency that is not on npmjs.org and link to a GitHub repository;
  3. Publish the package to npmjs.org.
  4. Navigate to the "Dependencies" tab of your newly-created Node module;
  5. Click on the random dependency.

You should see a 404 page pop up and you can create a completely unrelated module with the same name. If you do create a package with the same name as the random dependency, npmjs.org will assume that this is in fact the dependency of the original package we published and not the GitHub repository. Please note, that during the installation process you still install everything according to the package.json file, this is simply an issue in the way that npmjs.org links to the dependency.

Browser with version

Firefox Developer Edition 62.0b2 (64-bit)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions