Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

TypeError: type.symbol.getEscapedName is not a function #58

Open
qingjinlyc opened this issue Aug 22, 2019 · 0 comments
Open

TypeError: type.symbol.getEscapedName is not a function #58

qingjinlyc opened this issue Aug 22, 2019 · 0 comments

Comments

@qingjinlyc
Copy link

My webpack.config.json:

const path = require('path');
module.exports = ({ config }) => {
    config.module.rules.push({
      test: /\.(ts|tsx)$/,
      use: [
        {
          loader: require.resolve('awesome-typescript-loader'),
          options: {
            configFileName: path.resolve(__dirname, './tsconfig.json'),
            transpileOnly: true,
            errorsAsWarnings: true  
          }
        },
        {
          loader: require.resolve('react-docgen-typescript-loader'),
        },
      ],
    });
    config.resolve.extensions.push('.ts', '.tsx');
    return config;
};

I am using it with storybook. When I run yarn storybook, error occurs:

ERROR in ./src/components/ui/commons/TitleTwo.tsx
Module build failed (from ./node_modules/react-docgen-typescript-loader/dist/index.js):
TypeError: type.symbol.getEscapedName is not a function
    at Parser.getComponentInfo (E:\node_modules\react-docgen-typescript\src\parser.ts:238:20)
    at E:\node_modules\react-docgen-typescript\src\parser.ts:959:20
    at Array.map (<anonymous>)
    at E:\node_modules\react-docgen-typescript\src\parser.ts:958:12
    at Array.reduce (<anonymous>)
    at parseWithProgramProvider (E:\node_modules\react-docgen-typescript\src\parser.ts:947:6)
    at Object.parseWithProgramProvider (E:\node_modules\react-docgen-typescript\src\parser.ts:171:14)
    at processResource (E:\node_modules\react-docgen-typescript-loader\src\loader.ts:113:32)
    at Object.loader (E:\node_modules\react-docgen-typescript-loader\src\loader.ts:39:23)
 @ ./stories/Titles-Stories.tsx 4:0-61 9:45-53
 @ ./stories sync \.tsx$
 @ ./.storybook/config.ts
 @ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.ts (webpack)-hot-middleware/client.js?reload=true

Any idea of this? Thanks.

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

1 participant