リモートで働くプログラマーの検索結果

リモ太がググったことの覚書

「TypeError: Cannot read property 'kind' of undefined」というエラーがでてstorybookが動かない

stroybookを動かそうとしたら以下のようなエラーが出た

yarn run v1.19.2
$ start-storybook -p 6006
info @storybook/react v5.0.5
info 
info => Loading presets
info => Loading presets
info => Loading custom webpack config (full-control mode).
info => Using base config because react-scripts is not installed.
 10% building 7/9 modules 2 active .../node_modules/webpack/buildin/module.jsBrowserslist: caniuse-lite is outdated. Please run next command `yarn upgrade caniuse-lite browserslist`

WARNING: We noticed you're using the `useBuiltIns` option without declaring a core-js version. Currently, we assume version 2.x when no version is passed. Since this default version will likely change in future versions of Babel, we recommend explicitly setting the core-js version you are using via the `corejs` option.

You should also be sure that the version you pass to the `corejs` option matches the version specified in your `package.json`'s `dependencies` section. If it doesn't, you need to run one of the following commands:

  npm install --save core-js@2    npm install --save core-js@3
  yarn add core-js@2              yarn add core-js@3

Browserslist: caniuse-lite is outdated. Please run next command `yarn upgrade`
 94% after seal<path>/node_modules/typescript/lib/typescript.js:86995
                throw e;
                ^

TypeError: Cannot read property 'kind' of undefined
    at Object.isBinaryExpression (<path>/node_modules/typescript/lib/typescript.js:13389:21)
    at getTypeReferenceTypeWorker (<path>/node_modules/typescript/lib/typescript.js:38554:51)
    at getTypeReferenceType (<path>/node_modules/typescript/lib/typescript.js:38493:24)
    at getTypeFromTypeReference (<path>/node_modules/typescript/lib/typescript.js:38672:28)
    at getTypeFromTypeNode (<path>/node_modules/typescript/lib/typescript.js:40177:28)
    at tryGetTypeFromEffectiveTypeNode (<path>/node_modules/typescript/lib/typescript.js:35563:24)
    at getTypeForVariableLikeDeclaration (<path>/node_modules/typescript/lib/typescript.js:35193:32)
    at getWidenedTypeForVariableLikeDeclaration (<path>/node_modules/typescript/lib/typescript.js:35532:56)
    at getTypeOfVariableOrParameterOrPropertyWorker (<path>/node_modules/typescript/lib/typescript.js:35646:24)
    at getTypeOfVariableOrParameterOrProperty (<path>/node_modules/typescript/lib/typescript.js:35568:48)
    at getTypeOfSymbol (<path>/node_modules/typescript/lib/typescript.js:35857:24)
    at checkPropertyAccessExpressionOrQualifiedName (<path>/node_modules/typescript/lib/typescript.js:48182:53)
    at checkPropertyAccessExpression (<path>/node_modules/typescript/lib/typescript.js:48134:20)
    at checkExpressionWorker (<path>/node_modules/typescript/lib/typescript.js:51814:28)
    at checkExpression (<path>/node_modules/typescript/lib/typescript.js:51757:42)
    at checkNonNullExpression (<path>/node_modules/typescript/lib/typescript.js:48108:37)
    at checkPropertyAccessExpressionOrQualifiedName (<path>/node_modules/typescript/lib/typescript.js:48141:28)
    at checkPropertyAccessExpression (<path>/node_modules/typescript/lib/typescript.js:48134:20)
    at checkExpressionWorker (<path>/node_modules/typescript/lib/typescript.js:51814:28)
    at checkExpression (<path>/node_modules/typescript/lib/typescript.js:51757:42)
    at checkBinaryLikeExpression (<path>/node_modules/typescript/lib/typescript.js:51223:28)
    at checkBinaryExpression (<path>/node_modules/typescript/lib/typescript.js:51211:20)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Typescriptのバージョンを "3.2.4" から "3.7.5" にあげたら解決した