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\node_modules@frontity\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: