ramasilveyra / gitpkg

Publish packages as git tags
MIT License
274 stars 27 forks source link

Getting an error while publishing the packages when using yarn 2 #43

Closed subgan82 closed 2 years ago

subgan82 commented 3 years ago

We use gitpkg for publishing the internal packages as git tags, it works well for a project that uses yarn 1.

But on a project that uses Yarn 2 , getting an error while gitpkg tries to publish the tags. Can we support gitpkg when using yarn 2.

Stderr Status: gitpkg publish v1.0.0-beta.2

Stderr Status: lerna ERR! gitpkg publish stderr:

Stderr Status: - Processing...
events.js:353
      throw er; // Unhandled 'error' event
      ^

Error: ENOENT: no such file or directory, open '/projectyarn2/packages/package-xyz/package-xyz-v0.2.0.tgz'
Emitted 'error' event on ReadStream instance at:
    at internal/fs/streams.js:126:14
    at FSReqCallback.oncomplete (fs.js:180:23) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/projectyarn2/packages/package-xyz/package-xyz-v0.2.0.tgz'
}
ethanbdev commented 3 years ago

yarn pack needs to be run with an output file name argument here it looks like:

https://github.com/ramasilveyra/gitpkg/blob/master/src/tasks/Publish/prepare-package.js#L15