Error when trying to run storybook for Angular on Angular 8 project
See original GitHub issueDescribe the bug Had this problem since upgraded to Angular 8 RC from Angular 7, still getting it after upgraded to final Angular 8 packages.
When trying to run newly added Storybook (Angular project with 2 angular libraries, which uses ng-packagr for build, and 1 Angular UI app), getting this:
> start-storybook -p 6006
info @storybook/angular v5.1.0-rc.3
info
info => Loading presets
info => Loading presets
info => Loading custom addons config.
info => Found custom tsconfig.json
info => Using default webpack setup.
WARN Broken build, fix the error below.
WARN You may need to refresh the browser.
ERR! TypeError: Cannot read property 'startsWith' of undefined
ERR! at isAbsolute (C:\Users\serge\Documents\angular-material\node_modules\@angular-devkit\core\src\virtual-fs\path.js:103:14)
ERR! at resolve (C:\Users\serge\Documents\angular-material\node_modules\@angular-devkit\core\src\virtual-fs\path.js:143:9)
ERR! at C:\Users\serge\Documents\angular-material\node_modules\@storybook\angular\dist\server\angular-cli_utils.js:102:50
ERR! at Array.map (<anonymous>)
ERR! at normalizeAssetPatterns (C:\Users\serge\Documents\angular-material\node_modules\@storybook\angular\dist\server\angular-cli_utils.js:96:24)
ERR! at getAngularCliWebpackConfigOptions (C:\Users\serge\Documents\angular-material\node_modules\@storybook\angular\dist\server\angular-cli_config.js:76:73)
ERR! at Object.webpackFinal (C:\Users\serge\Documents\angular-material\node_modules\@storybook\angular\dist\server\framework-preset-angular-cli.js:14:92)
ERR! at C:\Users\serge\Documents\angular-material\node_modules\@storybook\core\dist\server\presets.js:80:72
ERR! at processTicksAndRejections (internal/process/task_queues.js:89:5)
ERR! TypeError: Cannot read property 'startsWith' of undefined
ERR! at isAbsolute (C:\Users\serge\Documents\angular-material\node_modules\@angular-devkit\core\src\virtual-fs\path.js:103:14)
ERR! at resolve (C:\Users\serge\Documents\angular-material\node_modules\@angular-devkit\core\src\virtual-fs\path.js:143:9)
ERR! at C:\Users\serge\Documents\angular-material\node_modules\@storybook\angular\dist\server\angular-cli_utils.js:102:50
ERR! at Array.map (<anonymous>)
ERR! at normalizeAssetPatterns (C:\Users\serge\Documents\angular-material\node_modules\@storybook\angular\dist\server\angular-cli_utils.js:96:24)
ERR! at getAngularCliWebpackConfigOptions (C:\Users\serge\Documents\angular-material\node_modules\@storybook\angular\dist\server\angular-cli_config.js:76:73)
ERR! at Object.webpackFinal (C:\Users\serge\Documents\angular-material\node_modules\@storybook\angular\dist\server\framework-preset-angular-cli.js:14:92)
ERR! at C:\Users\serge\Documents\angular-material\node_modules\@storybook\core\dist\server\presets.js:80:72
ERR! at processTicksAndRejections (internal/process/task_queues.js:89:5) {
ERR! stack: "TypeError: Cannot read property 'startsWith' of undefined\n at " +
ERR! 'isAbsolute ' +
ERR! '(C:\\Users\\serge\\Documents\\angular-material\\node_modules\\@angular-devkit\\core\\src\\virtual-fs\\path.js:103:14)\n' +
ERR! ' at resolve ' +
ERR! '(C:\\Users\\serge\\Documents\\angular-material\\node_modules\\@angular-devkit\\core\\src\\virtual-fs\\path.js:143:9)\n' +
ERR! ' at ' +
ERR! 'C:\\Users\\serge\\Documents\\angular-material\\node_modules\\@storybook\\angular\\dist\\server\\angular-cli_utils.js:102:50\n' +
ERR! ' at Array.map (<anonymous>)\n at normalizeAssetPatterns ' +
ERR! '(C:\\Users\\serge\\Documents\\angular-material\\node_modules\\@storybook\\angular\\dist\\server\\angular-cli_utils.js:96:24)\n' +
ERR! ' at getAngularCliWebpackConfigOptions ' +
ERR! '(C:\\Users\\serge\\Documents\\angular-material\\node_modules\\@storybook\\angular\\dist\\server\\angular-cli_config.js:76:73)\n' +
ERR! ' at Object.webpackFinal ' +
ERR! '(C:\\Users\\serge\\Documents\\angular-material\\node_modules\\@storybook\\angular\\dist\\server\\framework-preset-angular-cli.js:14:92)\n' +
ERR! ' at ' +
ERR! 'C:\\Users\\serge\\Documents\\angular-material\\node_modules\\@storybook\\core\\dist\\server\\presets.js:80:72\n' +
ERR! ' at processTicksAndRejections (internal/process/task_queues.js:89:5)'
ERR! }
When adding Storybook to a fresh Angular 8 project, getting this when trying to launch Storybook:
$ npm run storybook
> test8@0.0.0 storybook C:\Users\serge\Documents\test8
> start-storybook -p 6006
info @storybook/angular v5.1.0-rc.3
info
info => Loading presets
info => Loading presets
info => Loading custom addons config.
info => Found custom tsconfig.json
info => Using default webpack setup.
info => Loading angular-cli config.
info => Get angular-cli webpack config.
Starting type checking service...
Using 1 worker with 2048MB memory limit
webpack built 14d555ae4e95af295d02 in 5057ms
× 「wdm」: Hash: 14d555ae4e95af295d02
Version: webpack 4.32.2
Time: 5057ms
Built at: 2019-05-30 14:05:21
Asset Size Chunks Chunk Names
favicon.ico 5.3 KiB [emitted]
iframe.html 2.52 KiB [emitted]
main.14d555ae4e95af295d02.bundle.js 10.3 KiB main [emitted] main
main.14d555ae4e95af295d02.bundle.js.map 4.16 KiB main [emitted] main
runtime~main.14d555ae4e95af295d02.bundle.js 31 KiB runtime~main [emitted] runtime~main
runtime~main.14d555ae4e95af295d02.bundle.js.map 32.1 KiB runtime~main [emitted] runtime~main
vendors~main.14d555ae4e95af295d02.bundle.js 5.14 MiB vendors~main [emitted] [big] vendors~main
vendors~main.14d555ae4e95af295d02.bundle.js.map 5.13 MiB vendors~main [emitted] vendors~main
Entrypoint main [big] = runtime~main.14d555ae4e95af295d02.bundle.js runtime~main.14d555ae4e95af295d02.bundle.js.map vendors~main.14d555ae4e95af295d02.bundle.js vendors~main.14d555ae4e95af295d02.bundle.js.map main.14d555ae4e95af295d02.bundle.js main.14d555ae4e95af295d02.bundle.js.map
[0] multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true ./src/styles.scss 76 bytes {main} [built]
[./.storybook/config.js] 510 bytes {main} [built]
[./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src/index.js?!./node_modules/sass-loader/lib/loader.js?!./src/styles.scss] ./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--9-3!./src/styles.scss 121 bytes {main} [built]
[./node_modules/@storybook/angular/dist/client/index.js] 1.46 KiB {vendors~main} [built]
[./node_modules/@storybook/core/dist/server/common/polyfills.js] 120 bytes {vendors~main} [built]
[./node_modules/@storybook/core/dist/server/preview/globals.js] 93 bytes {vendors~main} [built]
[./node_modules/@storybook/core/node_modules/regenerator-runtime/runtime.js] 23 KiB {vendors~main} [built]
[./node_modules/airbnb-js-shims/index.js] 40 bytes {vendors~main} [built]
[./node_modules/core-js/features/symbol/index.js] 251 bytes {vendors~main} [built]
[./node_modules/core-js/modules/es.array.iterator.js] 2.16 KiB {vendors~main} [built]
[./node_modules/core-js/modules/es.object.to-string.js] 367 bytes {vendors~main} [built]
[./node_modules/core-js/modules/web.dom-collections.for-each.js] 619 bytes {vendors~main} [built]
[./node_modules/core-js/modules/web.dom-collections.iterator.js] 1.4 KiB {vendors~main} [built]
[./node_modules/webpack-hot-middleware/client.js?reload=true] (webpack)-hot-middleware/client.js?reload=true 7.68 KiB {vendors~main} [built]
[./src/styles.scss] 1.53 KiB {main} [built]
+ 759 hidden modules
WARNING in C:\Users\serge\Documents\test8\.storybook\tsconfig.json
[tsl] ERROR
TS5058: The specified path does not exist: 'C:/Users/serge/Documents/test8/src/tsconfig.app.json'.
@ ./src/stories sync \.stories\.ts$ ./index.stories.ts
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true ./src/styles.scss
WARNING in ./src/stories/index.stories.ts
Module build failed (from ./node_modules/ts-loader/index.js):
Error: error while parsing tsconfig.json
at Object.loader (C:\Users\serge\Documents\test8\node_modules\ts-loader\dist\index.js:19:18)
@ ./src/stories sync \.stories\.ts$ ./index.stories.ts
@ ./.storybook/config.js
@ multi ./node_modules/@storybook/core/dist/server/common/polyfills.js ./node_modules/@storybook/core/dist/server/preview/globals.js ./.storybook/config.js (webpack)-hot-middleware/client.js?reload=true ./src/styles.scss
ERROR in ERROR in undefined(undefined,undefined):
TS5058: The specified path does not exist: 'C:/Users/serge/Documents/test8/src/tsconfig.app.json'.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts(1166,9):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts(1169,9):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts(1170,28):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts(1426,34):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts(2749,43):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/common/common.d.ts(2800,52):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/aot/compiler.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/aot/compiler.d.ts(87,32):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts(354,20):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts(356,28):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts(358,15):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts(360,23):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts(362,17):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compile_metadata.d.ts(364,25):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compiler_facade_interface.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/compiler_facade_interface.d.ts(130,12):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/metadata_resolver.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/metadata_resolver.d.ts(71,61):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/metadata_resolver.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/metadata_resolver.d.ts(77,89):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/output/output_ast.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/output/output_ast.d.ts(580,63):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/api.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/api.d.ts(131,12):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/compiler.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/compiler.d.ts(58,227):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/compiler.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/compiler.d.ts(58,261):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/i18n/context.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/i18n/context.d.ts(34,15):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/i18n/context.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/i18n/context.d.ts(35,19):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/i18n/context.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/i18n/context.d.ts(44,34):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts(40,45):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts(40,94):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts(40,189):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts(43,43):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts(43,84):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts(43,135):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/t2_binder.d.ts(43,169):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/template.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/template.d.ts(82,268):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/template.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/template.d.ts(82,303):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/template.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/render3/view/template.d.ts(82,337):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/template_parser/binding_parser.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/template_parser/binding_parser.d.ts(23,18):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/template_parser/binding_parser.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/template_parser/binding_parser.d.ts(57,12):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/type_check_compiler.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/type_check_compiler.d.ts(30,161):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts(24,21):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts(25,22):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts(27,75):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts(27,120):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/compiler/src/view_compiler/view_compiler.d.ts(28,64):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts(3690,18):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts(9440,70):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts(10031,21):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts(10032,16):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts(10035,21):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/core/core.d.ts(10036,16):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/platform-browser/platform-browser.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/platform-browser/platform-browser.d.ts(681,33):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/platform-browser/platform-browser.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/platform-browser/platform-browser.d.ts(841,42):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/platform-browser/platform-browser.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/platform-browser/platform-browser.d.ts(930,30):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/platform-browser/platform-browser.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/platform-browser/platform-browser.d.ts(1013,30):
TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/router/router.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/router/router.d.ts(523,28):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/router/router.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/@angular/router/router.d.ts(524,34):
TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
ERROR in C:/Users/serge/Documents/test8/node_modules/rxjs/internal/Observable.d.ts
ERROR in C:/Users/serge/Documents/test8/node_modules/rxjs/internal/Observable.d.ts(89,59):
TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
Child HtmlWebpackCompiler:
Asset Size Chunks Chunk Names
__child-HtmlWebpackPlugin_0 558 KiB HtmlWebpackPlugin_0 HtmlWebpackPlugin_0
Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
[./node_modules/html-webpack-plugin/lib/loader.js!./node_modules/@storybook/core/dist/server/templates/index.ejs] 1.69 KiB {HtmlWebpackPlugin_0} [built]
[./node_modules/lodash/lodash.js] 527 KiB {HtmlWebpackPlugin_0} [built]
[./node_modules/webpack/buildin/global.js] (webpack)/buildin/global.js 472 bytes {HtmlWebpackPlugin_0} [built]
[./node_modules/webpack/buildin/module.js] (webpack)/buildin/module.js 497 bytes {HtmlWebpackPlugin_0} [built]
WARN Broken build, fix the error below.
WARN You may need to refresh the browser.
To Reproduce Steps to reproduce the behavior for second error log (I have no idea how to reproduce it for 1st one, because project where it happens is pretty complex, but you may contact me in person and we could figure out how to reproduce it):
ng new test8 --routing true --style scss
fresh Angular 8 project- Add Storybook v5.1.0-rc.3
- run
npm run storybook
- See error
Expected behavior Should open storybook in browser without errors
System:
- OS: [Windows10]
- Device: [Custom PC, Core-i7-8700]
- Browser: [chrome, opera]
- Framework: [angular]
- Version: [v5.1.0-rc.3]
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
storybook fails to start after upgrade angular - Stack Overflow
shakirov\\project\\src\\front\\project-ui-kit\\node_modules\\@storybook\\angular\\dist\\ts3.9\\server\\framework-preset-angular-ivy.js" ERR!
Read more >Storybook for Angular tutorial
Storybook runs alongside your app in development mode. It helps you build UI components isolated from the business logic and context of your...
Read more >Angular 15.0 | having a weird error using Storybook for ...
anyone met that error in case of storybook ? " ERROR Error: Error trying to diff '[]'. Only arrays and iterables are allowed"....
Read more >storybook/angular - npm
Start using @storybook/angular in your project by running `npm i @storybook/angular`. There are 12 other projects in the npm registry using ...
Read more >How to Build a Component Library with Angular and Storybook
Now we can use npm run pack_button to get a tarball called button-0.0.1.tgz. Or if you want to publish it to a repository...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Small update
Clean project run was fixed by fixing tsconfig.
But my primary project still fails. Same error on running storybook and similar when building:
I wonder if this has something to do with my custom build commands. In package json I have build command which builds 2 libs first and then builds app. And one of libs has its own custom webpack config. I wonder what storybook does exaclty when it builds. I suspect that it ignores build commands from package.json.
@sdurnov Had the same issue. I was able to fix that by adding the
sourceRoot
property in angular.json for the default project. Hope that helps.