Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

Can't compile locally #175

Open
deeeed opened this issue Dec 31, 2021 · 1 comment
Open

Can't compile locally #175

deeeed opened this issue Dec 31, 2021 · 1 comment

Comments

@deeeed
Copy link

deeeed commented Dec 31, 2021

Describe the bug
After cloning the repo, follow the steps to compile but get error on test.

To Reproduce
git clone https://github.com/react-keycloak/react-keycloak.git
yarn install yarn test

react-keycloak$ yarn test
yarn run v1.22.17
$ lerna run test
lerna notice cli v3.22.1
lerna info versioning independent
lerna info Executing command in 3 packages: "npm run test"
lerna info run Ran npm script 'test' in '@react-keycloak/core' in 5.2s:

> @react-keycloak/core@3.2.0 test
> jest

lerna info run Ran npm script 'test' in '@react-keycloak/ssr' in 3.6s:

> @react-keycloak/ssr@3.3.0 test
> jest

lerna ERR! npm run test exited 1 in '@react-keycloak/web'
lerna ERR! npm run test stdout:

> @react-keycloak/web@3.4.0 test
> jest


lerna ERR! npm run test stderr:
FAIL test/useKeycloak.spec.tsx
  ● Test suite failed to run

    src/provider.ts:1:36 - error TS2307: Cannot find module '@react-keycloak/core' or its corresponding type declarations.

    1 import { createAuthProvider } from '@react-keycloak/core'
                                         ~~~~~~~~~~~~~~~~~~~~~~

Test Suites: 1 failed, 1 total
Tests:       0 total
Snapshots:   0 total
Time:        3.383 s
Ran all test suites.

lerna ERR! npm run test exited 1 in '@react-keycloak/web'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
react-keycloak$ 
@tobiasfrei
Copy link

You have to extend the tsconfig with baseUrl and path.
https://github.com/tobiasfrei/react-keycloak-fork/blob/master/packages/ssr/tsconfig.json#L26

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

No branches or pull requests

2 participants