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

ERROR Can't resolve 'react-dom/client' in Fable.Elmish.React 4.0.0-beta-4 #79

Closed
brud opened this issue Nov 19, 2022 · 2 comments
Closed

Comments

@brud
Copy link

brud commented Nov 19, 2022

Description

Hi, I'm trying to build a safe stack project with pre-release versions of fable.* packages and I get this error:

ERROR in ./src/Client/output/fable_modules/Fable.Elmish.React.4.0.0-beta-4/react.fs.js 3:0-43
Module not found: Error: Can't resolve 'react-dom/client' in '/home/anton/RiderProjects/safe-origin/src/Client/output/fable_modules/Fable.Elmish.React.4.0.0-beta-4'
resolve 'react-dom/client' in '/home/anton/RiderProjects/safe-origin/src/Client/output/fable_modules/Fable.Elmish.React.4.0.0-beta-4'
  Parsed request is a module
  using description file: /home/anton/RiderProjects/safe-origin/package.json (relative path: ./src/Client/output/fable_modules/Fable.Elmish.React.4.0.0-beta-4)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      /home/anton/RiderProjects/safe-origin/src/Client/output/fable_modules/Fable.Elmish.React.4.0.0-beta-4/node_modules doesn't exist or is not a directory
      /home/anton/RiderProjects/safe-origin/src/Client/output/fable_modules/node_modules doesn't exist or is not a directory
      /home/anton/RiderProjects/safe-origin/src/Client/output/node_modules doesn't exist or is not a directory
      /home/anton/RiderProjects/safe-origin/src/Client/node_modules doesn't exist or is not a directory
      /home/anton/RiderProjects/safe-origin/src/node_modules doesn't exist or is not a directory
      looking for modules in /home/anton/RiderProjects/safe-origin/node_modules
        existing directory /home/anton/RiderProjects/safe-origin/node_modules/react-dom
          using description file: /home/anton/RiderProjects/safe-origin/node_modules/react-dom/package.json (relative path: .)
            using description file: /home/anton/RiderProjects/safe-origin/node_modules/react-dom/package.json (relative path: ./client)
              no extension
                /home/anton/RiderProjects/safe-origin/node_modules/react-dom/client doesn't exist
              .js
                /home/anton/RiderProjects/safe-origin/node_modules/react-dom/client.js doesn't exist
              .json
                /home/anton/RiderProjects/safe-origin/node_modules/react-dom/client.json doesn't exist
              .wasm
                /home/anton/RiderProjects/safe-origin/node_modules/react-dom/client.wasm doesn't exist
              as directory
                /home/anton/RiderProjects/safe-origin/node_modules/react-dom/client doesn't exist
      /home/anton/RiderProjects/node_modules doesn't exist or is not a directory
      /home/anton/node_modules doesn't exist or is not a directory
      /home/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
 @ ./src/Client/output/App.js 1:0-121 31:22-64

Repro code

I have a repro project: https://github.com/brud/safe-stack-remoting-issue-repro

It also has an error in the server project, which I have already reported to Zaid.

Related information

  • FSharp.Core version: 7.0.0
  • Fable version: 4.0.0-theta-017
  • elmish version: 4.0.0-beta-5
  • fable-compiler version: 1.3.18
  • Fable.Core: 4.0.0-theta-007
  • Operating system: Kubuntu 22.04.1 LTS (kde plasma: 5.24.7; 6.0.0-9.1-liquorix-amd64)
@et1975
Copy link
Member

et1975 commented Nov 19, 2022

I believe you need to upgrade React dependency to v18.

@brud
Copy link
Author

brud commented Nov 20, 2022

@et1975 it works, thank you

@brud brud closed this as completed Nov 20, 2022
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