Skip to content

npm-publish does not support the "prepack" lifecycle script #182

Open

Description

Describe the bug
https://github.com/jfrog/jfrog-cli-core/blob/master/artifactory/utils/npm/pack.go#L16

The above line expects the output of npm pack to be only the filename of the tarball. However, when using the prepack lifecycle script, the output includes information about that script. Because packageFileName is incorrect, the CLI cannot deploy the tarball and throws an error akin to the following:

open /usr/src/app/foo/> @foo/bar@9.90.0-alpha.5 prepack /usr/src/app/foo
  > npm run build-lib
  > @foo/bar@9.90.0-alpha.5 build-lib /usr/src/app/foo
  > tsc --p tsconfig.lib.json
  foo-bar-9.90.0-alpha.5.tgz: no such file or directory

To Reproduce
Attempt to deploy an npm package via the JFrog CLI npm-publish command with any prepack lifecycle script in package.json.

Expected behavior
The prepack script should run, preparing files for deployment, and the tarball that npm created should be published.

Versions

  • JFrog CLI version (if applicable): 1.50.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions