react-docgen-typescript icon indicating copy to clipboard operation
react-docgen-typescript copied to clipboard

Not able to access /node_modules/.cache/ts-docgen

Open tulga-bytes opened this issue 3 years ago • 0 comments

I'm facing issue running storybook with react-docgen-typescript.

I run npm run storybook, which runs start-storybook -p 6006.

Here's my setup.

node version: 16.15 npm version: 8.5.5 OS: mac storybook version: 6.5.9 react-docgen-typescript-loader: 3.1.0 webpack version: 4

/.storybook/main.js
const path = require('path')

module.exports = {
  "stories": [
    "../src/**/*.stories.mdx",
    "../src/**/*.stories.@(ts|tsx)"
  ],
  typescript: {
    check: false,
    checkOptions: {},
    reactDocgen: 'react-docgen-typescript',
    reactDocgenTypescriptOptions: {
      shouldExtractLiteralValuesFromEnum: true,
      propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
    },
  },
  "addons": [
    "@storybook/addon-links",
    "@storybook/addon-essentials",
    "@storybook/addon-interactions",
    "@storybook/addon-postcss"
  ],
  "framework": "@storybook/react"
}
70% sealing React Docgen Typescript Pluginnode:internal/fs/utils:345
    throw err;
    ^

Error: EACCES: permission denied, open '/node_modules/.cache/ts-docgen/ts-docgen'
    at Object.openSync (node:fs:585:3)
    at Object.writeFileSync (node:fs:2170:35)
    at writeJSON (/node_modules/flat-cache/src/utils.js:42:8)
    at Object.save (/node_modules/flat-cache/src/cache.js:119:5)
    at /node_modules/@storybook/react-docgen-typescript-plugin/dist/plugin.js:238:23
    at SyncHook.eval [as call] (eval at create (/node_modules/tapable/lib/HookCodeFactory.js:19:10), <anonymous>:19:1)
    at SyncHook.lazyCompileHook (/node_modules/tapable/lib/Hook.js:154:20)
    at Compilation.seal (/node_modules/webpack/lib/Compilation.js:1284:19)
    at /node_modules/webpack/lib/Compiler.js:675:18
    at /node_modules/webpack/lib/Compilation.js:1261:4 {
  errno: -13,
  syscall: 'open',
  code: 'EACCES',
  path: '/node_modules/.cache/ts-docgen/ts-docgen'
}

tulga-bytes avatar Jul 24 '22 18:07 tulga-bytes