Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yarn Test Errors #272

Open
goheesheng opened this issue Feb 1, 2023 · 3 comments
Open

Yarn Test Errors #272

goheesheng opened this issue Feb 1, 2023 · 3 comments

Comments

@goheesheng
Copy link

Hi, i tried running yarn test but leads to this error. I have also reinstall node.js but to no avail

test@test:~/Desktop/rmrk-substrate$ cd tests && yarn test
yarn run v1.22.19
warning ../../package.json: No license field
$ mocha --timeout 9999999 -r ts-node/register './src/*.test.ts'

✖ ERROR: Error: Cannot find module 'ts-node/register'
Require stack:

  • /usr/lib/node_modules/mocha/lib/nodejs/esm-utils.js
  • /usr/lib/node_modules/mocha/lib/mocha.js
  • /usr/lib/node_modules/mocha/lib/cli/one-and-dones.js
  • /usr/lib/node_modules/mocha/lib/cli/options.js
  • /usr/lib/node_modules/mocha/bin/mocha.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
    at Module._load (node:internal/modules/cjs/loader:885:27)
    at Module.require (node:internal/modules/cjs/loader:1105:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at exports.requireOrImport (/usr/lib/node_modules/mocha/lib/nodejs/esm-utils.js:53:16)
    at async exports.handleRequires (/usr/lib/node_modules/mocha/lib/cli/run-helpers.js:94:28)
    at async /usr/lib/node_modules/mocha/lib/cli/run.js:349:25 {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/usr/lib/node_modules/mocha/lib/nodejs/esm-utils.js',
    '/usr/lib/node_modules/mocha/lib/mocha.js',
    '/usr/lib/node_modules/mocha/lib/cli/one-and-dones.js',
    '/usr/lib/node_modules/mocha/lib/cli/options.js',
    '/usr/lib/node_modules/mocha/bin/mocha.js'
    ]
    }
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@ilionic
Copy link
Contributor

ilionic commented Feb 1, 2023

Hi, did you install modules in tests folder?
yarn install

Which nodejs version do you have?

@goheesheng
Copy link
Author

Hi I tried using v18.13.0 and v19.5.0

@ilionic
Copy link
Contributor

ilionic commented Feb 1, 2023

Did you install dependencies? yarn install

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants