Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to publish package using Yarn -- cannot read properties of undefined (reading 'pipe') #698

Closed
eswat2 opened this issue May 28, 2023 · 6 comments

Comments

@eswat2
Copy link

eswat2 commented May 28, 2023

Description

  1. updated np to 8.0.1
  2. fixed a complaint about missing engines.node in package.json
  3. tried to publish a repo that uses np
➜  proto-tailwindcss-clrs git:(main) np patch

Publish a new version of proto-tailwindcss-clrs (current: 0.0.245, next: 0.0.246)


  ✔ Prerequisite check
  ✔ Git
  ✔ Installing dependencies using Yarn
  ✔ Running tests using Yarn
  ✔ Bumping version using Yarn
  ✖ Publishing package using Yarn
    → Cannot read properties of undefined (reading 'pipe')
    Pushing tags
    Creating release draft on GitHub

✖ Cannot read properties of undefined (reading 'pipe')

Aborted!

I tried using --verbose but it didn't give me any more information about the error...

Steps to reproduce

  1. clone the repo for this -- https://www.npmjs.com/package/proto-tailwindcss-clrs?activeTab=versions
  2. try to run np patch
  3. see the error ??

Expected behavior

it should publish a new version of the package using Yarn and then open the draft on GitHub...

Environment

np - 8.0.1
Node.js - 18.16.0
npm - 9.5.1
yarn - 1.22.19
Git - 2.40.1
OS - macOS Ventura 13.4 (22F66)

@eswat2
Copy link
Author

eswat2 commented May 28, 2023

i ran np patch --preview and got this:

➜  proto-tailwindcss-clrs git:(main) np patch --preview

Publish a new version of proto-tailwindcss-clrs (current: 0.0.247, next: 0.0.248)


  ✔ Prerequisite check
  ✔ Git
  ✔ Installing dependencies using Yarn
  ✔ Running tests using Yarn
  ↓ Bumping version using Yarn [skipped]
    → [Preview] Command not executed: yarn version --new-version patch.
  ✖ Publishing package using Yarn
    → publish.getPackagePublishArguments is not a function
    Pushing tags
    Creating release draft on GitHub

✖ publish.getPackagePublishArguments is not a function

if i run yarn version --new-version patch, i see this:

➜  proto-tailwindcss-clrs git:(main) yarn version --new-version patch
yarn version v1.22.19
info Current version: 0.0.247
info New version: 0.0.248
✨  Done in 0.09s.

still not sure how to resolve this. It could very easily be a stupid user error... :)

@mmkal
Copy link
Collaborator

mmkal commented May 29, 2023

I saw the same thing without yarn - npm 9.5.0, node v18.15.0. I didn't do any debugging, because it had already messed up my repo's state by bumping the package.json version. I just switched to npm publish.

A suggestion to make this kind of thing easier to debug - write more verbose error logs (including a stack trace) to a .log file somewhere, and write the file path to stdout if something goes wrong? There's no good way to know what's wrong with a message like cannot read properties of undefined (reading 'pipe').

@handlebauer
Copy link

Running into this issue as well:

CleanShot 2023-05-29 at 15 34 08@2x

Tried to put a min repro together and encountered a separate problem:

CleanShot 2023-05-29 at 15 37 18@2x

... where that's just hanging indefinitely.

Appreciate the continued releases for this great tool. I'll stick to 7.x until things are resolved with this 👍 .

@sindresorhus
Copy link
Owner

It seems 72879e0 forgot a return statement.

// @tommy-mitchell

@sindresorhus
Copy link
Owner

I tried using --verbose but it didn't give me any more information about the error...

12fce88

@sindresorhus
Copy link
Owner

https://github.com/sindresorhus/np/releases/tag/v8.0.2

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants