GSN Starter Kit - Module not found: Can't resolve '@openzeppelin/network/lib/react'

Hi @abcoathup,

I just encountered the same error (GSN Starter Kit compilation problems) while following Dapp’s setup with GSN (
I’m on WSL.
And after using the command:

  1. ln -ns …/…/build
  2. npm start

Output :

Failed to compile
Module not found: Can't resolve '@openzeppelin/network/lib/react' in '/home/hydris/blockchain/gsn-dapp/client/src'.

Can you help me with this problem?

nvm version : v14.2.0
npm version : ‘6.14.4’

my src folder :

hydris@DESKTOP-JJV8HBC:~/blockchain/gsn-dapp/client/src$ ll
total 16
drwxrwxrwx 1 hydris hydris 4096 May  6 15:56 ./
drwxrwxrwx 1 hydris hydris 4096 May  6 15:24 ../
-rw-rw-rw- 1 hydris hydris  564 May  6 15:11 App.css
-rw-rw-rw- 1 hydris hydris 1986 May  6 15:56 App.js
-rw-rw-rw- 1 hydris hydris  280 May  6 15:11 App.test.js
lrwxrwxrwx 1 hydris hydris   11 May  6 15:28 build -> ../../build/
-rw-rw-rw- 1 hydris hydris  366 May  6 15:11 index.css
-rw-rw-rw- 1 hydris hydris  503 May  6 15:11 index.js
-rw-rw-rw- 1 hydris hydris 2671 May  6 15:11 logo.svg
lrwxrwxrwx 1 hydris hydris   11 May  6 15:56 react -> ./lib/react
-rw-rw-rw- 1 hydris hydris 5086 May  6 15:11 serviceWorker.js
-rw-rw-rw- 1 hydris hydris  255 May  6 15:11 setupTests.js
1 Like

Hi @hydris-bessa,

Welcome to the community :wave:

I tried with node 14 but ran into an issue with ganache-cli:

There may be other issues in the ecosystem with node 14.
I recommend using node 10 or node 12.

I use WSL2 with node v10.19.0

When OpenZeppelin Network.js is installed it should create a soft link for react -> lib/react in node_modules/@openzeppelin/network.
If that doesn’t get created automatically, you can create it manually or change references to ‘lib/react’

:warning: Starter Kits are in maintenance mode. We are no longer actively developing new features, and will only be releasing fixes for high severity issues until July 2020. Read here for more info, and reach out if you are interested in taking over maintenance. We suggest looking into create-eth-app for a popular alternative to this project.

GSN v2 is currently in development, see OpenGSN for details.

Thank you @abcoathup for your answer.

I had to reinstall all the packages.
There was a problem with the installation of @openzeppelin/network. Some components did not install correctly which prevented the import from App.js

1 Like