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

Cannot find module '@code/LinearSearchList' #27

Open
HossamMuhammedOmar opened this issue Nov 8, 2022 · 6 comments
Open

Cannot find module '@code/LinearSearchList' #27

HossamMuhammedOmar opened this issue Nov 8, 2022 · 6 comments

Comments

@HossamMuhammedOmar
Copy link

Hello,

When I tried to test the search linear algorithm by running the command npx jest Linear, I received the error message

Cannot find module '@code/LinearSearchList' or its corresponding type declarations.

Capture

@zohaibhu
Copy link

zohaibhu commented Nov 9, 2022

same things is happaning on here

@panuwizzle
Copy link

I ran node scripts/generate.js 2 and the code was generated in src/day2

@MrsLecter
Copy link

MrsLecter commented Nov 10, 2022

Hi!

  • Fix your code:
    You should pass your code to test. If you have a structure:
    src_tests_\YourTestFile
    src\day1\YourFileName
    Put it in your test instead @code/YourFileName;
    In my case:
    kataproblem
  • Or try to generate files with the script: node scripts/generate

@leshec
Copy link

leshec commented Dec 12, 2022

Not sure if this helps. When I cloned the repo I had to follow the Primes/Kata-machine github Read.me instructions. e.g. I had to update the ligma.js file etc and install ts-jest to get tests running:
https://kulshekhar.github.io/ts-jest/docs/getting-started/installation/

@jonathanochaya
Copy link

  1. npm install
  2. npm run generate
  3. npx jest "algorithm test file" - i.e npx run LinearSearchList

@JanWartenberg
Copy link

I had a similar issue after doing yarn install again (which created "day2"..) - but then wanting to re-run some code from day1. I manually edited the paths within .jest.config.json and tsconfig.json which fixed it.

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

7 participants