storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.4k stars 9.28k forks source link

Compilation issue during the start or build of storybook #16591

Closed fjoalland closed 2 years ago

fjoalland commented 2 years ago

Describe the bug I would like to use storybook with Angular 8 on a business project.This project contains a private repository that blocks me when compiling as you can see below:

info @storybook/angular v6.3.12 info info => Cleaning outputDir: /Users/fabien/IdeaProjects/cndiag-frontend/storybook-static info => Loading presets info => Compiling preview.. info => Loading 1 config file in "/Users/fabien/IdeaProjects/cndiag-frontend/.storybook" info => Loading 9 other files in "/Users/fabien/IdeaProjects/cndiag-frontend/.storybook" info => Adding stories defined in "/Users/fabien/IdeaProjects/cndiag-frontend/.storybook/main.js" info => Found custom tsconfig.json Warning: Entry point '@enerbim/cnmap-angular-editor-lib' contains deep imports into '/Users/fabien/IdeaProjects/cndiag-frontend/node_modules/pdfmake/build/pdfmake'. This is probably not a problem, but may cause the compilation of entry points to be out of order. Compiling @enerbim/wikipim-catalog : fesm2015 as esm2015 ERR! FatalDiagnosticError { ERR! code: 1010, ERR! node: NodeObject { ERR! pos: 158476, ERR! end: 159357, ERR! flags: 65536, ERR! modifierFlagsCache: 0, ERR! transformFlags: 536870912, ERR! parent: NodeObject { ERR! pos: 158451, ERR! end: 159357, ERR! flags: 65536, ERR! modifierFlagsCache: 536870912, ERR! transformFlags: 536870912, ERR! parent: [NodeObject], ERR! kind: 275, ERR! decorators: undefined, ERR! modifiers: undefined, ERR! name: [IdentifierObject], ERR! questionToken: undefined, ERR! exclamationToken: undefined, ERR! initializer: [Circular], ERR! symbol: [SymbolObject] ERR! }, ERR! kind: 187, ERR! multiLine: true, ERR! elements: [ ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [NodeObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! [IdentifierObject], ERR! pos: 158478, ERR! end: 159339, ERR! hasTrailingComma: true, ERR! transformFlags: 536870912 ERR! ] ERR! }, ERR! message: 'Value at position 2 in the NgModule.imports of WikiPimCatalogModule is not a reference: [object Object]', ERR! _isFatalDiagnosticError: true ERR! } npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! cn-diag-frontend@0.1.0-SNAPSHOT build-storybook: npm run docs:json && build-storybook npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the cn-diag-frontend@0.1.0-SNAPSHOT build-storybook script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Is it possible to exclude the compilation from a particular library?

System

fabien@MacBook-Pro-de-Joalland cndiag-frontend % npx sb@next info No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.

No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.

gyp: No Xcode or CLT version detected! gyp ERR! configure error gyp ERR! stack Error: gyp failed with exit code: 1 gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) gyp ERR! stack at ChildProcess.emit (events.js:315:20) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12) gyp ERR! System Darwin 19.6.0 gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /Users/fabien/.npm/_npx/98064/lib/node_modules/sb/node_modules/watchpack-chokidar2/node_modules/fsevents gyp ERR! node -v v12.18.2 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok

Environment Info:

System: OS: macOS 10.15.7 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Binaries: Node: 12.18.2 - /usr/local/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.5 - /usr/local/bin/npm Browsers: Chrome: 95.0.4638.69 Edge: 95.0.1020.40 Firefox: 86.0.1 Safari: 14.1.2 npmPackages: @storybook/addon-actions: ^6.3.12 => 6.3.12 @storybook/addon-essentials: ^6.3.12 => 6.3.12 @storybook/addon-links: ^6.3.12 => 6.3.12 @storybook/angular: ^6.3.12 => 6.3.12 npmGlobalPackages: @storybook/cli: 6.3.12

Additional context

Previously, I already had an error with compodoc that I no longer have by adding this parameter compodoc -p ./tsconfig.json -e json -d . --disableRoutesGraph

fjoalland commented 2 years ago

I fixed it, I needed to downgrade storybook from 6.3.12 to 6.1.0.