sparse-guitar-91772
08/01/2024, 7:08 AMyarn test
on packages/shared
of growthbook repo. I've entered the following commands:
nvm use v18.20.3
yarn install
yarn workspace shared test packages/shared/test/sdk-versioning.test.ts
and the error appears:
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?sparse-guitar-91772
08/01/2024, 9:31 AMsparse-guitar-91772
08/01/2024, 10:24 AMyarn build
then try again.