steida/actualtasks

Type SetAppState can not be imported in Circle CI

Closed this issue · 1 comments

Locally, it works. But in Circle CI:

#!/bin/bash -eo pipefail
yarn test
yarn run v1.5.1
$ run-s lint tsc build
$ tslint -p .
$ tsc
packages/web/hooks/useAppState.ts:3:29 - error TS2307: Cannot find module '@app/shared/lib/appState/AppStateContext'.

3 import { SetAppState } from '@app/shared/lib/appState/AppStateContext';
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

packages/web/pages/me.tsx:16:20 - error TS7031: Binding element 'viewer' implicitly has an 'any' type.

16     setAppState(({ viewer }) => {
                      ~~~~~~

packages/web/pages/me.tsx:31:20 - error TS7031: Binding element 'viewer' implicitly has an 'any' type.

31     setAppState(({ viewer }) => {
                      ~~~~~~


Found 3 errors.

error An unexpected error occurred: "Command failed.
Exit code: 1
Command: sh
Arguments: -c tsc
Directory: /home/circleci/repo
Output:

Check web useAppState hook.

Omg. It's because Webpack treats exported type as real type.

babel/babel-loader#603 (comment)