Skip to content
This repository was archived by the owner on Aug 11, 2022. It is now read-only.
This repository was archived by the owner on Aug 11, 2022. It is now read-only.

npm prune corrupts non-extraneous packages #15646

@Lodin

Description

@Lodin

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

I created a PR to the create-elm-app, and the travis build went wrong in some reason. After exploring I have understood that the npm prune removes all files from the node_modules/.bin directory. It happens only with node v7.5.0 and npm 4.1.2, so the build for node v6.9.5 and npm v3.10.10 was successful. node v7.4.0 works well too.

It works not only under travis Debian, but under my Windows 10 as well.

Logs:

  • The travis log for failed build can be found here
  • The travis log for successful build can be found here

How can the CLI team reproduce the problem?

Under the node v7.5.0 and npm 4.1.2

$ npm install -g yarn $ git clone https://github.com/Lodin/create-elm-app.git $ cd create-elm-app $ git checkout webpack-update $ yarn $ npm link ../create-elm-app $ npm prune $ npm test

After the last command it should fail with following error:

sh: 1: mocha: not found npm ERR! Test failed. See above for more details.

supporting information:

  • npm -v prints: 4.1.2
  • node -v prints: 7.5.0
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: Windows 10 and Debian Linux
  • Network issues:
    • Geographic location where npm was run:
    • I use a proxy to connect to the npm registry.
    • I use a proxy to connect to the web.
    • I use a proxy when downloading Git repos.
    • I access the npm registry via a VPN
    • I don't use a proxy, but have limited or unreliable internet access.
  • Container:
    • I develop using Vagrant on Windows.
    • I develop using Vagrant on OS X or Linux.
    • I develop / deploy using Docker.
    • I deploy to a PaaS (Triton, Heroku).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions