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

Bulma Intellisense error: Fable.React does not contain ReactElement #133

Closed
mrakgr opened this issue Feb 18, 2023 · 8 comments
Closed

Bulma Intellisense error: Fable.React does not contain ReactElement #133

mrakgr opened this issue Feb 18, 2023 · 8 comments

Comments

@mrakgr
Copy link

mrakgr commented Feb 18, 2023

In Visual Studio, I get The module/namespace 'Fable.React' from compilation unit 'Fable.React' did not contain the namespace, module or type 'ReactElement' whenever I try to autocomplete Bulma. In Visual Studio Code, I get this at the top of the module.

The project compiles fine despite this using dotnet run.

What do I do about this? It might be due to me upgrading all the packages to the latest, but if so, I'd rather not resolve it by downgrading.

@MangelMaxime
Copy link
Contributor

@mrakgr Hum, this is looks like a error related to he fact that you are using Fable.React 9 with a version of Feliz or Feliz.Bulma which doesn't support Fable.React 9.

You can either manually revert to Fable.React 8, Feliz 1, Feliz.Compiler 1, etc.

Or try to use Feliz 2, the pre release version of Feliz.Bulma 2. Note that if you use Feliz 2, you need to use Fable 4 prerelease.

@mrakgr
Copy link
Author

mrakgr commented Feb 19, 2023

Updating Fable to the prerelease is easy using dotnet tool update fable --prerelease, but I am having trouble figuring out how to do it for Feliz.Bulma. Any tips?

@mrakgr
Copy link
Author

mrakgr commented Feb 19, 2023

nuget Feliz prerelease
nuget Feliz.Bulma prerelease

I tried putting this in, but it doesn't seem like the version is changing.

@MangelMaxime
Copy link
Contributor

nuget Feliz prerelease
nuget Feliz.Bulma prerelease

I tried putting this in, but it doesn't seem like the version is changing.

This is indeed the correct of doing it. Did you run dotnet paket install or dotnet paket update?

You can also check in your paket.lock which versions is used to be sure of what is happening.

@mrakgr
Copy link
Author

mrakgr commented Feb 19, 2023

dotnet paket update. I checked in the diff window, but the versions haven't changed from what you can see in the lock file.

@MangelMaxime
Copy link
Contributor

For Feliz, it is normal your version didn't change because this is already the latest version.

For Feliz.Bumla, I suspect that this is because the name of the version is not standard... You can pin the version your self manually. You will need to relax your Fsharp.Core restriction because Feliz.Bumla require Fsharp.Core v7.

nuget Fsharp.Core ~> 7
# ...
nuget Feliz.Bulma 3.0.0-pre-002

@mrakgr
Copy link
Author

mrakgr commented Feb 19, 2023

PS E:\Webdev\Fable\SAFE-Stack---Vite-Template> paket find-package-versions Feliz.Bulma
Paket version 7.2.0+bb14ab674b2748070a624f394cd6796e11aaffa8
3.0.0-pre-002
3.0.0-pre-001
2.19.0
2.18.0

I see, I could have just used this to check the versions. Yeah, it works now. Thank you.

@mrakgr mrakgr closed this as completed Feb 19, 2023
@MangelMaxime
Copy link
Contributor

Your welcome, I sent a PR trying to make Feliz.Bulma ready for stable version #134

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

2 participants