[FIXED] Hello there I'm quite new to monorepo, and...
# ask-questions
s
[FIXED] Hello there I'm quite new to monorepo, and this time I decided to run
yarn test
on
packages/shared
of growthbook repo. I've entered the following commands:
Copy code
nvm use v18.20.3
yarn install
yarn workspace shared test packages/shared/test/sdk-versioning.test.ts
and the error appears:
Copy code
yarn run v1.22.11
$ jest --forceExit --verbose --detectOpenHandles test/sdk-versioning.test.ts
 FAIL  test/sdk-versioning.test.ts
  ● Test suite failed to run

    Cannot find module '@growthbook/growthbook' from 'src/sdk-versioning/index.ts'

    Require stack:
      src/sdk-versioning/index.ts
      test/sdk-versioning.test.ts

      22 | import * as elixir_json from "./sdk-versions/elixir.json";
      23 | import * as edge_cloudflare_json from "./sdk-versions/edge-cloudflare.json";
    > 24 | import * as edge_fastly_json from "./sdk-versions/edge-fastly.json";
         |                     ^
      25 | import * as edge_lambda_json from "./sdk-versions/edge-lambda.json";
      26 | import * as edge_other_json from "./sdk-versions/edge-other.json";
      27 | import * as other_json from "./sdk-versions/other.json";

      at Resolver.resolveModule (../../node_modules/jest-resolve/build/resolver.js:324:11)
      at Object.<anonymous> (src/sdk-versioning/index.ts:24:21)

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        0.397 s
Ran all test suites matching /test\/sdk-versioning.test.ts/i.
error Command failed with exit code 1.
info Visit <https://yarnpkg.com/en/docs/cli/run> for documentation about this command.
I have no idea why this came up, does anyone know how to install dependencies correctly and resolve such an issue?
🙌 1
Node JS Version: v18.20.3 Yarn Version: 1.22.11
For anyone who experiences the same error, please use
yarn build
then try again.
👍 1