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

Failed to publish package using Melos #81

Open
dangvinh opened this issue Jun 21, 2022 · 4 comments
Open

Failed to publish package using Melos #81

dangvinh opened this issue Jun 21, 2022 · 4 comments

Comments

@dangvinh
Copy link

Hi,
I'm using Melos to manage my packages in one mono-repo,

But, when I publish package to self-hosted (unpub), it's through error:

Reading pub registry for package information... SUCCESS
Unhandled exception:
FormatException: Unexpected character (at character 1)
<!DOCTYPE html>
^

#0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1383:5)
#1      _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1250:9)
#2      _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:915:22)
#3      _parseJson (dart:convert-patch/convert_patch.dart:35:10)
#4      JsonDecoder.convert (dart:convert/json.dart:612:36)
#5      JsonCodec.decode (dart:convert/json.dart:216:41)
#6      Package.getPublishedVersions (package:melos/src/package.dart:770:15)
<asynchronous suspension>
#7      _PublishMixin._getLatestPublishedVersionForPackages.<anonymous closure> (package:melos/src/commands/publish.dart:109:24)
<asynchronous suspension>
#8      Pool.forEach.run (package:pool/pool.dart:183:19)
<asynchronous suspension>
#9      Pool.withResource (package:pool/pool.dart:127:14)
<asynchronous suspension>
#10     Future.wait.<anonymous closure> (dart:async/future.dart:521:21)
<asynchronous suspension>

I have researched, and it's seem as an Unpub bug.
Note: it's related to this issue: invertase/melos#307

@talisk
Copy link
Collaborator

talisk commented Aug 15, 2022

It looks like the api <pub-server>/packages/<package-name>.json returned an invalid result. Could you paste the response body of the api? @dangvinh

@pontus-andersson
Copy link

@dangvinh any updates on this? We're investigating if it's possible to use unpub with melos atm.
Let me know if we can help out with something.

@ahmdaeyz
Copy link

Hey @pontus-andersson,
I'm also investigating the possibility of using unpub with melos, Were you able to do that without any issues?

@pontus-andersson
Copy link

Hey @pontus-andersson,

I'm also investigating the possibility of using unpub with melos, Were you able to do that without any issues?

Not yet, unfortunately.

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