# GSN Starter Kit compilation problems

**URL:** <https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003>\
**Category:** Starter Kits - Support\
**Created:** [December 29, 2019, 9:21am UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003 "2019-12-29T09:21:20Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Steeve](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/steeve/32/3627_2.png) [@Steeve](https://forum.openzeppelin.com/u/Steeve)\
**Post date:** [December 29, 2019, 9:21am UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/1 "2019-12-29T09:21:20Z")

</div>

The installation and running of the starter GSN App was with some difficulty:

1. Had to use Yarn to run the start script. npm just would just fail silently
2. The node-sass vendor binding was missing so I could not compile. The solution for that found in the [sass github issue](https://github.com/sass/node-sass/issues/2133).
3. Now I get this compilation module error:

> ```
> Failed to compile../src/App.js
> Module not found: Can't resolve '@openzeppelin/network/react' in '/home/workspace/starter-kit-gsn/client/src'
> 
> ```

Any help on this would be appreciated.

---

<div class="post-metadata">

**Author:** ![Steeve](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/steeve/32/3627_2.png) [@Steeve](https://forum.openzeppelin.com/u/Steeve)\
**Post date:** [December 29, 2019, 5:19pm UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/2 "2019-12-29T17:19:05Z")

</div>

It may be dependency issues; I tried re installing openzeppelin/network got the following output:

> root:client# npm install @openzeppelin/networknpm WARN @typescript-eslint/eslint-plugin@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.  
> npm WARN @typescript-eslint/parser@1.13.0 requires a peer of eslint@^5.0.0 but none is installed. You must install peer dependencies yourself.  
> npm WARN ajv-keywords@3.4.1 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.  
> npm WARN eslint-config-react-app@5.0.1 requires a peer of eslint-plugin-react-hooks@1.x but none is installed. You must install peer dependencies yourself.  
> npm WARN react-app-rewired@2.1.0 requires a peer of react-scripts@^2.1.3 but none is installed. You must install peer dependencies yourself.  
> npm WARN ts-pnp@1.1.2 requires a peer of typescript@\* but none is installed. You must install peer dependencies yourself.  
> npm WARN tsutils@3.17.1 requires a peer of typescript@\>=2.8.0 || \>= 3.2.0-dev || \>= 3.3.0-dev || \>= 3.4.0-dev || \>= 3.5.0-dev || \>= 3.6.0-dev || \>= 3.6.0-beta || \>= 3.7.0-dev || \>= 3.7.0-beta but none is installed. You must install peer dependencies yourself.  
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node\_modules/jest-haste-map/node\_modules/fsevents):  
> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node\_modules/fsevents):  
> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})  
> npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node\_modules/chokidar/node\_modules/fsevents):  
> npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})+ @openzeppelin/network@0.2.10updated 1 package and audited 1061084 packages in 18.953s  
> found 14248 vulnerabilities (6 low, 3 moderate, 14239 high) run `npm audit fix` to fix them, or `npm audit` for details

---

<div class="post-metadata">

**Author:** ![Steeve](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/steeve/32/3627_2.png) [@Steeve](https://forum.openzeppelin.com/u/Steeve)\
**Post date:** [December 29, 2019, 6:59pm UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/3 "2019-12-29T18:59:32Z")

</div>

I pushed ahead until help arrives:(it seems the straightforward installation of gsn-starter-kit is somewhat a twisted rocky road). Manually installing missing dependencies is not recommended. However the important react-scripts was missing (?) so I installed it than ran into es-lint version problems which I corrected **but I still get a compilation error:**

Now when I run the start script with yarn,

> Attempted import error: 'PublicAddress' is not exported from 'rimble-ui'.

I see the error in line 2 of _/src/components/Web3Info/index.js_

> import { PublicAddress, Button } from 'rimble-ui';

new versions rimble-ui do **not** export PublicAddress ..

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [December 29, 2019, 8:59pm UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/4 "2019-12-29T20:59:55Z")

</div>

Hi @Steeve,

Sorry to hear that you are having issues with the GSN Starter Kit.

What operating system, node and npm versions are you using?

I am using Windows Subsystem for Linux on Windows 10 with the following node and npm versions:

```auto
$ node --version
v10.16.0
$ npm --version
6.13.4

```

```auto
$ oz --version
2.6.0

```

I just ran the GSN Starter Kit on the above setup, so unfortunately didn’t have the same experience that you did.

```auto
openzeppelin unpack OpenZeppelin/starter-kit-gsn

```

---

<div class="post-metadata">

**Author:** ![Steeve](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/steeve/32/3627_2.png) [@Steeve](https://forum.openzeppelin.com/u/Steeve)\
**Post date:** [December 30, 2019, 12:59am UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/5 "2019-12-30T00:59:28Z")

</div>

system requirements are good to know:  
I'm using Ubuntu 16.04 via ssh  
My node default was version 11.6 but but got errors so I switched via nvm which gave the errors in my posts. So presently my :

> $ node --version  
> v10.16.3

> $ npm --version  
> 6.9.0

> $ oz --version  
> 2.5.3

Before I make updates maybe tell me what are the minimum system requirements?

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [December 30, 2019, 1:10am UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/6 "2019-12-30T01:10:56Z")

</div>

Hi @Steeve,

There isn’t an explicit minimum system requirement (that I know of).

I can change my versions to match what you are using to see if I can reproduce what you are experiencing.

---

<div class="post-metadata">

**Author:** ![Steeve](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/steeve/32/3627_2.png) [@Steeve](https://forum.openzeppelin.com/u/Steeve)\
**Post date:** [December 30, 2019, 10:59pm UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/7 "2019-12-30T22:59:35Z")

</div>

I made a fresh directory , used NVM to set the node version to 10.16 then followed each installation step. (without the sass errors)

> #yarn start  
> Failed to compile  
> ./src/App.js  
> Module not found: Can't resolve '@openzeppelin/network/react' in '/home/workspace/Starter-gsn-kit/client/src'

@abcoathup can you please show your installation steps and why react wasn't in the 'network' folder? I had to edit the App.js import to @openzeppelin/network/ **lib** /react│  
There must be some alias thing missing ?

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [January 2, 2020, 3:33am UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/8 "2020-01-02T03:33:55Z")

</div>

Hi @Steeve,

I’m sorry that you are still having issues.  
The following are my installation steps using the following versions:

```auto
$ node --version
v10.16.0
$ npm --version
6.13.4
$ oz --version
2.6.0

```

## Create directory

```auto
$ mkdir starter && cd starter

```

## Unpack GSN Starter Kit

```auto
$ openzeppelin unpack OpenZeppelin/starter-kit-gsn
✓ Kit downloaded and unpacked
The kit is ready to use.

Quick Start
Run your local blockchain:
> ganache-cli --deterministic
Initialize the OpenZeppelin SDK project:
> openzeppelin init app
Go to the client directory:
> cd client
Run the React app:
> npm run start
Continue in your browser!
More at https://github.com/OpenZeppelin/starter-kit-gsn

```

## Initialize project

```auto
$ oz init starter
? Initial project version 1.0.2
Project initialized. Write a new contract in the contracts folder and run 'openzeppelin create' to deploy it.

```

## Deploy Counter contract

```auto
$ oz create
✓ Compiling contracts with Truffle, using settings from truffle.js file
Truffle output:

Compiling your contracts...
===========================
> Compiling ./contracts/Counter.sol
> Compiling @openzeppelin/contracts-ethereum-package/contracts/GSN/Context.sol
> Compiling @openzeppelin/contracts-ethereum-package/contracts/GSN/GSNRecipient.sol
> Compiling @openzeppelin/contracts-ethereum-package/contracts/GSN/IRelayHub.sol
> Compiling @openzeppelin/contracts-ethereum-package/contracts/GSN/IRelayRecipient.sol
> Compiling @openzeppelin/upgrades/contracts/Initializable.sol
> Artifacts written to /c/Users/andre/Documents/projects/forum/starter/build/contracts
> Compiled successfully using:
   - solc: 0.5.12+commit.7709ece9.Emscripten.clang

? Pick a contract to instantiate Counter
? Pick a network development
✓ Added contract Counter
✓ Contract Counter deployed
All contracts have been deployed
? Call a function to initialize the instance after creating it? Yes
? Select which function * initialize(num: uint256)
? num (uint256): 42
✓ Setting everything up to create contract instances
✓ Instance created at 0x630589690929E9cdEFDeF0734717a9eF3Ec7Fcfe
0x630589690929E9cdEFDeF0734717a9eF3Ec7Fcfe

```

## Start dapp

```auto
$ cd client
$ npm run start   

```

The terminal shows one warning

```auto
Compiled with warnings.

./node_modules/web3-eth-accounts/src/scrypt.js
Critical dependency: the request of a dependency is an expression

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

```

## Fund recipient contract

I funded the recipient contract in a separate terminal

```auto
$ npx oz-gsn fund-recipient --recipient 0x630589690929E9cdEFDeF0734717a9eF3Ec7Fcfe
Recipient 0x630589690929E9cdEFDeF0734717a9eF3Ec7Fcfe balance is now 1000000000000000000 wei

```

---

<div class="post-metadata">

**Author:** ![Steeve](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/steeve/32/3627_2.png) [@Steeve](https://forum.openzeppelin.com/u/Steeve)\
**Post date:** [January 2, 2020, 1:14pm UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/9 "2020-01-02T13:14:39Z")

</div>

I updated OZ to version 2.6.0 did th steps above. _Start_ script fails with the same error as before :

> Module not found: Can’t resolve ‘@openzeppelin/network/react’ in ‘/home/workspace/Starter-gsn-kit/client/src’

I have to manually edit line 4 in App.js with the correct path

> @openzeppelin/network/ **lib** /react

to get it to run.

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [January 3, 2020, 8:57am UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/10 "2020-01-03T08:57:53Z")

</div>

Hi @Steeve,

OpenZeppelin Network.js uses `preinstall` npm hook to create the symlink for `react` hooks.  
It sounds like for some reason this symlink is not being created.

As you found, a work around is to import hooks directly from `openzeppelin/network/lib/react`.

What operating system are you using?

---

<div class="post-metadata">

**Author:** ![Steeve](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/steeve/32/3627_2.png) [@Steeve](https://forum.openzeppelin.com/u/Steeve)\
**Post date:** [January 3, 2020, 12:51pm UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/11 "2020-01-03T12:51:31Z")

</div>

I use Linux Ubuntu 16.04 operating system on a VPS (I _ssh_ via an old macbook _bash_ terminal).

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [May 7, 2020, 1:07am UTC](https://forum.openzeppelin.com/t/gsn-starter-kit-compilation-problems/2003/12 "2020-05-07T01:07:38Z")

</div>

A post was split to a new topic: [GSN Starter Kit - Module not found: Can’t resolve ‘@openzeppelin/network/lib/react’](https://forum.openzeppelin.com/t/gsn-starter-kit-module-not-found-cant-resolve-openzeppelin-network-lib-react/2810)
