Zaid-Ajaj / Feliz

A fresh retake of the React API in Fable and a collection of high-quality components to build React applications in F#, optimized for happiness
https://zaid-ajaj.github.io/Feliz/
MIT License
544 stars 81 forks source link

Failed to retrieve information about react required by Feliz #504

Closed napretep closed 2 years ago

napretep commented 2 years ago

Failed to retrieve information about react required by Feliz

how to solve this problem ?

image

image

image

Zaid-Ajaj commented 2 years ago

Hi @napretep thanks for filing the issue! This is probably an error in Femto where it tried to invoke yarn but got unexpected results (shape of JSON) I will have a look

Zaid-Ajaj commented 2 years ago

Hi there @napretep, I've just to reproduce the issue at hand and wasn't able to. Femto works just fine with the following versions

Femto v0.13.0
Yarn v1.22.19

If you don't have latest Femto, try updating it using dotnet tool update Femto add -g if you have installed the tool globally, same for yarn. Let me know if that solves your issue 🙏

MangelMaxime commented 2 years ago

@Zaid-Ajaj This issue remind me of https://github.com/Zaid-Ajaj/Femto/issues/92

But I never looked into it and don't know which version of Yarn was used.

napretep commented 2 years ago

Both yarn and femto have been updated to the latest version, still having problems.

Please check this file directly, thank you.

Btw, using npm is ok with femto

test_crx.zip

MangelMaxime commented 2 years ago

@napretep

The zip that you are providing is more or less empty. I don't know what we can do with it.

It would be better to have a reproduction repository with the actual project set up in it. You can push to it Github for example.

And also the version of the version of yarn and femto you are using by running yarn --version and dotnet femto --version ? Because latest is not something precise enough for reproducing the problem.

napretep commented 2 years ago

test_crx.zip oh , Sorry for uploading wrong zip , the new one contains the full code.

MangelMaxime commented 2 years ago

@napretep

Because you don't have a license field in your package.json yarn generates a strange response when running yarn yarn info react versions --json.

It returns:

{"type":"warning","data":"package.json: No license field"}
{"type":"inspect","data":["0.0.0-375616788","0.0.0-00d4f95c2","0.0.0-0203b6567","0.0.0-0935a1db3","0.0.0-0c756fb-697f004","0.0.0-0c756fb-f7f79fd","0.0.0-0cf9fc10b","0.0.0-0e4135e8c","0.0.0-0eea57724","0.0.0-1022ee0ec","0.0.0-10cc40018","0.0.0-11565a207","0.0.0-11b07597e","0.0.0-1214b302e","0.0.0-12adaffef","0.0.0-132b72d7b","0.0.0-172e...}

So form now you need to add a license field to your package.json.

If your project is private you can set it to "license": "UNLICENSED" NPM docs.

They also recommend setting "private": true as an extra security.

napretep commented 2 years ago

thank you for your help. I'd like to advice that if Femto could provide more error info from the place the process break down, it would be more efficient.

MangelMaxime commented 2 years ago

@napretep If you want to discuss it or contribute please feel free to open an issue on Femto repository.

It is not always easy to produce nice error for stuff we don't expect. Who would have though that not having a license would generate this kind of warning or that yarn would produce a response with 2 JSONs instead of one with a warning property?