I tried to follow the steps described here: https://storybook.js.org/docs/guides/guide-angular/
When running _run storybook_ I get SyntaxError: Unexpected token ] in JSON at position 195
"@storybook/addon-actions": "^5.2.4",
"@storybook/addon-links": "^5.2.4",
"@storybook/addon-notes": "^5.2.4",
"@storybook/addons": "^5.2.4",
"@storybook/angular": "^5.2.4",
ERR! SyntaxError: Unexpected token ] in JSON at position 195
ERR! at JSON.parse (<anonymous>)
ERR! at getTsConfigOptions (/Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/angular/dist/server/angular-cli_config.js:32:25)
ERR! at Object.getAngularCliWebpackConfigOptions (/Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/angular/dist/server/angular-cli_config.js:57:20)
ERR! at Object.webpackFinal (/Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/angular/dist/server/framework-preset-angular-cli.js:7:56)
ERR! at /Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/core/dist/server/presets.js:82:72
ERR! at processTicksAndRejections (internal/process/task_queues.js:89:5)
ERR! SyntaxError: Unexpected token ] in JSON at position 195
ERR! at JSON.parse (<anonymous>)
ERR! at getTsConfigOptions (/Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/angular/dist/server/angular-cli_config.js:32:25)
ERR! at Object.getAngularCliWebpackConfigOptions (/Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/angular/dist/server/angular-cli_config.js:57:20)
ERR! at Object.webpackFinal (/Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/angular/dist/server/framework-preset-angular-cli.js:7:56)
ERR! at /Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/core/dist/server/presets.js:82:72
ERR! at processTicksAndRejections (internal/process/task_queues.js:89:5) {
ERR! stack: 'SyntaxError: Unexpected token ] in JSON at position 195\n at ' +
ERR! 'JSON.parse (<anonymous>)\n at getTsConfigOptions ' +
ERR! '(/Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/angular/dist/server/angular-cli_config.js:32:25)\n' +
ERR! ' at Object.getAngularCliWebpackConfigOptions ' +
ERR! '(/Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/angular/dist/server/angular-cli_config.js:57:20)\n' +
ERR! ' at Object.webpackFinal ' +
ERR! '(/Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/angular/dist/server/framework-preset-angular-cli.js:7:56)\n' +
ERR! ' at ' +
ERR! '/Users/joelsjostrom/sr/seating-project/seating-client/node_modules/@storybook/core/dist/server/presets.js:82:72\n' +
ERR! ' at processTicksAndRejections (internal/process/task_queues.js:89:5)'
ERR! }
@beelio I had a similar issue and was able to fix it by checking the angular.json
file. It contained a wrong ,
(comma).
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!
Found the culprit (note the extra comma before ] ) -
Most helpful comment
@beelio I had a similar issue and was able to fix it by checking the
angular.json
file. It contained a wrong,
(comma).