Why wont storybook run in my react project after install?











up vote
0
down vote

favorite
1












I have been trying to build my first project using react and storybook.



I can run react fine, and I can install storybook, but when I try npm run storybook I get the below error and it wont run.



I have read the storybook documentation multiple times - https://storybook.js.org/



I have also read 2 great articles detailing the steps of how to start your own project using react and storybook - https://auth0.com/blog/setting-up-a-component-library-with-react-and-storybook/ and https://auth0.com/blog/building-a-component-library-with-react-and-storybook/



However despite taking great care in following this step by step, I keep getting the below error.



I am using windows 10, I dont know if that possibly is causing some issue? Any help on getting this to run would be greatly appreciated.



$ npm run storybook

> react-portfolio@0.1.0 storybook C:Usersgemmadesktopreact-portfolio
> start-storybook -p 9001 -c .storybook

C:UsersgemmaDesktopreact-portfolionode_modules@storybookcoredistserverconfigwebpack.config.default.js:13
return { ...storybookBaseConfig,
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:UsersgemmaDesktopreact-portfolionode_modules@storybookcoreserver.js:1:92)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-portfolio@0.1.0 storybook: `start-storybook -p 9001 -c .storybook`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-portfolio@0.1.0 storybook script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.









share|improve this question






















  • You will need to migrate to latest nodejs version. Looks like you are using older version of nodejs. tecadmin.net/upgrade-nodejs-via-npm this should help.
    – Saurabh Nemade
    Nov 15 at 5:18










  • You can check version compatibility node.green/#ES2018 for support for "object spread properties"
    – Saurabh Nemade
    Nov 15 at 5:21










  • Thank you @SaurabhNemade you were right! I thought I had the latest version already but I didnt and now I updated it and it works!
    – Gemma
    Dec 1 at 2:38










  • Welcome. Glad to help out :)
    – Saurabh Nemade
    Dec 1 at 5:38















up vote
0
down vote

favorite
1












I have been trying to build my first project using react and storybook.



I can run react fine, and I can install storybook, but when I try npm run storybook I get the below error and it wont run.



I have read the storybook documentation multiple times - https://storybook.js.org/



I have also read 2 great articles detailing the steps of how to start your own project using react and storybook - https://auth0.com/blog/setting-up-a-component-library-with-react-and-storybook/ and https://auth0.com/blog/building-a-component-library-with-react-and-storybook/



However despite taking great care in following this step by step, I keep getting the below error.



I am using windows 10, I dont know if that possibly is causing some issue? Any help on getting this to run would be greatly appreciated.



$ npm run storybook

> react-portfolio@0.1.0 storybook C:Usersgemmadesktopreact-portfolio
> start-storybook -p 9001 -c .storybook

C:UsersgemmaDesktopreact-portfolionode_modules@storybookcoredistserverconfigwebpack.config.default.js:13
return { ...storybookBaseConfig,
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:UsersgemmaDesktopreact-portfolionode_modules@storybookcoreserver.js:1:92)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-portfolio@0.1.0 storybook: `start-storybook -p 9001 -c .storybook`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-portfolio@0.1.0 storybook script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.









share|improve this question






















  • You will need to migrate to latest nodejs version. Looks like you are using older version of nodejs. tecadmin.net/upgrade-nodejs-via-npm this should help.
    – Saurabh Nemade
    Nov 15 at 5:18










  • You can check version compatibility node.green/#ES2018 for support for "object spread properties"
    – Saurabh Nemade
    Nov 15 at 5:21










  • Thank you @SaurabhNemade you were right! I thought I had the latest version already but I didnt and now I updated it and it works!
    – Gemma
    Dec 1 at 2:38










  • Welcome. Glad to help out :)
    – Saurabh Nemade
    Dec 1 at 5:38













up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





I have been trying to build my first project using react and storybook.



I can run react fine, and I can install storybook, but when I try npm run storybook I get the below error and it wont run.



I have read the storybook documentation multiple times - https://storybook.js.org/



I have also read 2 great articles detailing the steps of how to start your own project using react and storybook - https://auth0.com/blog/setting-up-a-component-library-with-react-and-storybook/ and https://auth0.com/blog/building-a-component-library-with-react-and-storybook/



However despite taking great care in following this step by step, I keep getting the below error.



I am using windows 10, I dont know if that possibly is causing some issue? Any help on getting this to run would be greatly appreciated.



$ npm run storybook

> react-portfolio@0.1.0 storybook C:Usersgemmadesktopreact-portfolio
> start-storybook -p 9001 -c .storybook

C:UsersgemmaDesktopreact-portfolionode_modules@storybookcoredistserverconfigwebpack.config.default.js:13
return { ...storybookBaseConfig,
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:UsersgemmaDesktopreact-portfolionode_modules@storybookcoreserver.js:1:92)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-portfolio@0.1.0 storybook: `start-storybook -p 9001 -c .storybook`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-portfolio@0.1.0 storybook script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.









share|improve this question













I have been trying to build my first project using react and storybook.



I can run react fine, and I can install storybook, but when I try npm run storybook I get the below error and it wont run.



I have read the storybook documentation multiple times - https://storybook.js.org/



I have also read 2 great articles detailing the steps of how to start your own project using react and storybook - https://auth0.com/blog/setting-up-a-component-library-with-react-and-storybook/ and https://auth0.com/blog/building-a-component-library-with-react-and-storybook/



However despite taking great care in following this step by step, I keep getting the below error.



I am using windows 10, I dont know if that possibly is causing some issue? Any help on getting this to run would be greatly appreciated.



$ npm run storybook

> react-portfolio@0.1.0 storybook C:Usersgemmadesktopreact-portfolio
> start-storybook -p 9001 -c .storybook

C:UsersgemmaDesktopreact-portfolionode_modules@storybookcoredistserverconfigwebpack.config.default.js:13
return { ...storybookBaseConfig,
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (C:UsersgemmaDesktopreact-portfolionode_modules@storybookcoreserver.js:1:92)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-portfolio@0.1.0 storybook: `start-storybook -p 9001 -c .storybook`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-portfolio@0.1.0 storybook script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.






reactjs npm storybook






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 15 at 1:37









Gemma

61




61












  • You will need to migrate to latest nodejs version. Looks like you are using older version of nodejs. tecadmin.net/upgrade-nodejs-via-npm this should help.
    – Saurabh Nemade
    Nov 15 at 5:18










  • You can check version compatibility node.green/#ES2018 for support for "object spread properties"
    – Saurabh Nemade
    Nov 15 at 5:21










  • Thank you @SaurabhNemade you were right! I thought I had the latest version already but I didnt and now I updated it and it works!
    – Gemma
    Dec 1 at 2:38










  • Welcome. Glad to help out :)
    – Saurabh Nemade
    Dec 1 at 5:38


















  • You will need to migrate to latest nodejs version. Looks like you are using older version of nodejs. tecadmin.net/upgrade-nodejs-via-npm this should help.
    – Saurabh Nemade
    Nov 15 at 5:18










  • You can check version compatibility node.green/#ES2018 for support for "object spread properties"
    – Saurabh Nemade
    Nov 15 at 5:21










  • Thank you @SaurabhNemade you were right! I thought I had the latest version already but I didnt and now I updated it and it works!
    – Gemma
    Dec 1 at 2:38










  • Welcome. Glad to help out :)
    – Saurabh Nemade
    Dec 1 at 5:38
















You will need to migrate to latest nodejs version. Looks like you are using older version of nodejs. tecadmin.net/upgrade-nodejs-via-npm this should help.
– Saurabh Nemade
Nov 15 at 5:18




You will need to migrate to latest nodejs version. Looks like you are using older version of nodejs. tecadmin.net/upgrade-nodejs-via-npm this should help.
– Saurabh Nemade
Nov 15 at 5:18












You can check version compatibility node.green/#ES2018 for support for "object spread properties"
– Saurabh Nemade
Nov 15 at 5:21




You can check version compatibility node.green/#ES2018 for support for "object spread properties"
– Saurabh Nemade
Nov 15 at 5:21












Thank you @SaurabhNemade you were right! I thought I had the latest version already but I didnt and now I updated it and it works!
– Gemma
Dec 1 at 2:38




Thank you @SaurabhNemade you were right! I thought I had the latest version already but I didnt and now I updated it and it works!
– Gemma
Dec 1 at 2:38












Welcome. Glad to help out :)
– Saurabh Nemade
Dec 1 at 5:38




Welcome. Glad to help out :)
– Saurabh Nemade
Dec 1 at 5:38

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311248%2fwhy-wont-storybook-run-in-my-react-project-after-install%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53311248%2fwhy-wont-storybook-run-in-my-react-project-after-install%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?