Error after installing package - "react-spring"

Hello.
I am very new to Frontity and having an issue installing and using the react-spring package in my project (running windows 10 x64). I’ve been following this tutorial → How To Use Frontity To Create A Headless WordPress Theme With React - YouTube.
I’ve ran “npx frontity create” with default settings (enter to all, n to emails) and it worked.
Later on in the tutorial (approx 10:40) the guide installs react-spring in order to add
transitions.
Until this point, the project works (I can “npm run dev”) but after running
“npm i react-spring”, the “npm run dev” command returns errors and ruins the project.
Am I missing a crucial part somewhere? Is there a different protocol to install packages if I am using Frontity? Help :slight_smile:

The Error:
Error: ./node_modules/@frontity/react-easy-state/dist/react-platform.js
Module not found: Error: Can’t resolve ‘react-dom’ in ‘C:\Users\Asaf\Desktop\Asaf\frontity\example\[email protected]\react-easy-state\dist’

On browser : localhost refused to connect.

Broswers console is empty.

Frontity info:

System:

  • OS: Windows 10 10.0.19044
  • CPU: (8) x64 Intel(R) Core™ i7-1065G7 CPU @ 1.30GHz
  • Memory: 9.50 GB / 15.67 GB

Binaries:

  • Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
  • npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD

Browsers:

  • Chrome: Not Found
  • Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.53)
  • Internet Explorer: 11.0.19041.1202

npmPackages:

  • @frontity/core: ^1.14.3 => 1.14.3
  • @frontity/html2react: ^1.7.0 => 1.7.0
  • @frontity/mars-theme: ./packages/mars-theme => 1.6.2
  • @frontity/tiny-router: ^1.4.4 => 1.4.4
  • @frontity/wp-source: ^1.11.7 => 1.11.7
  • frontity: ^1.17.1 => 1.17.1
  • react-spring: ^9.3.2 => 9.3.2

npmGlobalPackages:

  • frontity: Not Found
  • npx: Not Found

Thanks alot :slight_smile:

Hello, I got some problems a while ago trying to install react-spring from this https://www.npmjs.com/package/react-spring, instead, I tried ‘react spring/web’ @react-spring/web - npm and it worked like a charm. Don’t remember the exact error or why is this happening. Hope it helps

1 Like

Thank you for the reply,
I’ll be sure to check that :slight_smile: