# Converting ERC20 to ERC777 and errors with: Cannot find module ‘@openzeppelin/test-helpers’

**URL:** <https://forum.openzeppelin.com/t/converting-erc20-to-erc777-and-errors-with-cannot-find-module-openzeppelin-test-helpers/3052>\
**Category:** Contracts\
**Created:** [June 9, 2020, 5:40am UTC](https://forum.openzeppelin.com/t/converting-erc20-to-erc777-and-errors-with-cannot-find-module-openzeppelin-test-helpers/3052 "2020-06-09T05:40:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![stepheniecvc](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/stepheniecvc/32/2495_2.png) [@stepheniecvc](https://forum.openzeppelin.com/u/stepheniecvc)\
**Post date:** [June 9, 2020, 5:40am UTC](https://forum.openzeppelin.com/t/converting-erc20-to-erc777-and-errors-with-cannot-find-module-openzeppelin-test-helpers/3052/1 "2020-06-09T05:40:26Z")

</div>

Hi abcoathup,  
I unbox the truffle drizzle, and alter the erc20 token to erc777. I have installed openzepplin test helper. But when i deploy the contract, i get error message:

Error: Cannot find module ‘@openzeppelin/test-helpers’  
Require stack:

- /usr/local/lib/node\_modules/truffle/node\_modules/original-require/index.js
- /usr/local/lib/node\_modules/truffle/build/cli.bundled.js

---

<div class="post-metadata">

**Author:** ![stepheniecvc](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/stepheniecvc/32/2495_2.png) [@stepheniecvc](https://forum.openzeppelin.com/u/stepheniecvc)\
**Post date:** [June 9, 2020, 5:42am UTC](https://forum.openzeppelin.com/t/converting-erc20-to-erc777-and-errors-with-cannot-find-module-openzeppelin-test-helpers/3052/2 "2020-06-09T05:42:18Z")

</div>

> **[stepheniecvc/DrizzleDapp](https://github.com/stepheniecvc/DrizzleDapp)**
>
> Contribute to stepheniecvc/DrizzleDapp development by creating an account on GitHub.

this is my project… i switch the node version from 13 to 12 to 8… but still would not work…  
may I know what is the cause of the problem? thanks

---

<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:** [June 9, 2020, 6:06am UTC](https://forum.openzeppelin.com/t/converting-erc20-to-erc777-and-errors-with-cannot-find-module-openzeppelin-test-helpers/3052/3 "2020-06-09T06:06:21Z")

</div>

Hi @stepheniecvc,

`openzeppelin-test-helpers` is now called `@openzeppelin/test-helpers`.

To resolve you can uninstall `openzeppelin-test-helpers` and install `@openzeppelin/test-helpers`.

You can see this being used in my [Simple ERC777 token example](https://forum.openzeppelin.com/t/simple-erc777-token-example/746)

Please ask all the questions that you need.

---

<div class="post-metadata">

**Author:** ![stepheniecvc](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/stepheniecvc/32/2495_2.png) [@stepheniecvc](https://forum.openzeppelin.com/u/stepheniecvc)\
**Post date:** [June 9, 2020, 6:15am UTC](https://forum.openzeppelin.com/t/converting-erc20-to-erc777-and-errors-with-cannot-find-module-openzeppelin-test-helpers/3052/4 "2020-06-09T06:15:15Z")

</div>

hi thank you so much… i can deploy the contract now

---

<div class="post-metadata">

**Author:** ![Ale](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ale/32/4101_2.png) [@Ale](https://forum.openzeppelin.com/u/Ale)\
**Post date:** [August 2, 2021, 1:01am UTC](https://forum.openzeppelin.com/t/converting-erc20-to-erc777-and-errors-with-cannot-find-module-openzeppelin-test-helpers/3052/5 "2021-08-02T01:01:20Z")

</div>

Hello,

I am newbie here and I have still a problem to use the test helpers.

Here it is my trace:

```auto
pc15:client alexandre$ truffle test/votingGUI.test.js
Using network 'test'.

Compiling your contracts...
===========================
> Everything is up to date, there is nothing to compile.

Error: Cannot find module '@openzeppelin/test-helpers'
Require stack:
- /Users/alexandre/WebstormProjects/VotingGUI/test/votingGUI.test.js
- /usr/local/lib/node_modules/truffle/node_modules/mocha/lib/mocha.js
- /usr/local/lib/node_modules/truffle/node_modules/mocha/index.js
- /usr/local/lib/node_modules/truffle/build/cli.bundled.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object.<anonymous> (/Users/alexandre/WebstormProjects/VotingGUI/test/votingGUI.test.js:1:43)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at /usr/local/lib/node_modules/truffle/node_modules/mocha/lib/mocha.js:390:36
    at Array.forEach (<anonymous>)
    at Mocha.loadFiles (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/mocha.js:387:14)
    at Mocha.run (/usr/local/lib/node_modules/truffle/node_modules/mocha/lib/mocha.js:961:10)
    at /usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/testing/Test.js:151:1
    at new Promise (<anonymous>)
    at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/testing/Test.js:150:1)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at Object.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/commands/test/index.js:187:1)
    at Command.run (/usr/local/lib/node_modules/truffle/build/webpack:/packages/core/lib/command.js:167:1)
Truffle v5.3.13 (core: 5.3.13)
Node v14.17.1
pc15:client alexandre$

```

However, I did, before in the directory client: (where I have node\_modules directory and package.json), these commands:

npm uninstall openzeppelin-test-helpers

npm install @openzeppelin/test-helpers

It sounds strange for me… During my research, have you got any clues to give me please?

**Update**

When I try to uninstall @openzeppelin/test-helpers, I have this now:

```auto
pc15:client alexandre$ npm uninstall @openzeppelin/
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/alexandre/WebstormProjects/VotingGUI/client/node_modules/bignumber.js
npm ERR! dest /Users/alexandre/WebstormProjects/VotingGUI/client/node_modules/.bignumber.js-lw5gloMD
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/alexandre/WebstormProjects/VotingGUI/client/node_modules/bignumber.js' -> '/Users/alexandre/WebstormProjects/VotingGUI/client/node_modules/.bignumber.js-lw5gloMD'

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/alexandre/.npm/_logs/2021-08-02T07_40_40_528Z-debug.log
pc15:client alexandre$ npm uninstall @openzeppelin/test-helpers
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /Users/alexandre/WebstormProjects/VotingGUI/client/node_modules/bignumber.js
npm ERR! dest /Users/alexandre/WebstormProjects/VotingGUI/client/node_modules/.bignumber.js-lw5gloMD
npm ERR! errno -66
npm ERR! ENOTEMPTY: directory not empty, rename '/Users/alexandre/WebstormProjects/VotingGUI/client/node_modules/bignumber.js' -> '/Users/alexandre/WebstormProjects/VotingGUI/client/node_modules/.bignumber.js-lw5gloMD'

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/alexandre/.npm/_logs/2021-08-02T07_41_34_453Z-debug.log

```

I think it’s a problem with my node.js installed after some reading. I am about to uninstall and reinstall Node.js on my mac, what do you think?

Cordially,

---

<div class="post-metadata">

**Author:** ![Ale](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ale/32/4101_2.png) [@Ale](https://forum.openzeppelin.com/u/Ale)\
**Post date:** [August 7, 2021, 10:16am UTC](https://forum.openzeppelin.com/t/converting-erc20-to-erc777-and-errors-with-cannot-find-module-openzeppelin-test-helpers/3052/6 "2021-08-07T10:16:13Z")

</div>

Hello,

I found the solution! You have to install the dependencies with NPM at the root of your project. So you have to see a "node\_modules" directory at the root to recognize the helpers dependencies.

Cordially,

---

<div class="post-metadata">

**Author:** ![Ale](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/ale/32/4101_2.png) [@Ale](https://forum.openzeppelin.com/u/Ale)\
**Post date:** [August 8, 2021, 3:31pm UTC](https://forum.openzeppelin.com/t/converting-erc20-to-erc777-and-errors-with-cannot-find-module-openzeppelin-test-helpers/3052/7 "2021-08-08T15:31:04Z")

</div>

Moreover, I prefer to show you a screenshot to be clear:

 ![Screenshot at Aug 08 17-28-16](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/7/7a5c6630440d71e6686b7e4ee047055504157ba7.png)

And after, to run the tests, you run the command:

`truffle test test/ERC20.test.js`

Ale
