Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

counter example does not work #2450

Closed
sohrabsaran opened this issue Jun 13, 2017 · 5 comments
Closed

counter example does not work #2450

sohrabsaran opened this issue Jun 13, 2017 · 5 comments

Comments

@sohrabsaran
Copy link

sohrabsaran commented Jun 13, 2017

Do you want to request a feature or report a bug?
bug
(If this is a usage question, please do not post it here—post it on Stack Overflow instead. If this is not a “feature” or a “bug”, or the phrase “How do I...?” applies, then it's probably a usage question.)

What is the current behavior?
I downloaded the repos as a zip file and then unzipped it. I went to examples/counter and as per readme.md, in a root shell I ran 'npm start'. But I get an error 'react-scripts: not found'.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar.
Steps to reproduce are mentioned above.

What is the expected behavior?
I should not get any error or the examples/counter/README.md needs to be updated for the missing steps.

Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?
Redux version: downloaded a zip version of this repos on 11-Jun-17
Browser version: NA
OS version: Output of 'uname -a':
Linux sohrabhp 4.4.0-79-generic #100-Ubuntu SMP Wed May 17 19:57:27 UTC 2017 i686 athlon i686 GNU/Linux
node v4.2.6
npm v3.5.2

@markerikson
Copy link
Contributor

@sohrabsaran : did you actually run npm install first? If not, then there are no dependencies installed, and react-scripts won't exist.

@sohrabsaran
Copy link
Author

@markerikson I ran this also, but please note that README.md needs to be updated to mention this step. Also, after this the error did not go away, I also needed to do an 'npm install react-scripts' explicitly. But then I received another error parsing one of the startup scripts inside 'react-scripts'.

Further updates from my side: The defect template above does not ask for the versions of node.js and npm. I had the default versions of these installed for my OS (node 4.2.6) . On a wild guess I updated node.js to the latest version (v8.1.0). Then I ran 'npm install' once again, followed by 'npm start'. Now the example runs, but overall I still feel that there are some defect(s) in the use case described.

@timdorr
Copy link
Member

timdorr commented Jun 13, 2017

react-scripts will install if you run npm install from within the examples/counter directory after cloning from GitHub.

@sohrabsaran
Copy link
Author

@timdorr yes react-scripts is listed as a dependency in package.json so I am also not sure why I had to install it explicity. The issue I encountered seems to be related to the default versions of node.js and npm that are installed on Ubuntu 16.04.2 LTS using commands such as 'apt-get install nodejs' etc.

In any case, the README.md file does not mention 'npm install', only 'npm start'. Please check whether the README.md file needs to be updated.

@markerikson
Copy link
Contributor

Yeah - you need to npm install within the specific example folder, as that folder is its own separate project and package.json.

That said, I'd agree that it wouldn't hurt to have the "Run npm install" step added to the READMEs for the examples. If you would like to submit a PR adding that to each README, we can merge it in.

@timdorr timdorr closed this as completed Jun 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants