Why wont storybook run in my react project after install?
up vote
0
down vote
favorite
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
add a comment |
up vote
0
down vote
favorite
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
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
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
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
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
reactjs npm storybook
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
add a comment |
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
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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