0

I installed the Tutorial: Intro to React. ( tic-tac-toe game ) in Dropbox in Windows 10 Pro on a Desktop. I installed Ubuntu with zsh and installed Node.js using curl. The app starts in zsh or Bash.

However in my laptop I am unable to get the app to start in Bash, zsh, or the windows command terminal. Am I not able to use React in Dropbox on multiple computers?

Here is the message I get....Why is the script not recognized?

> tic-tac@0.1.0 start C:\Users\Doak\Dropbox\Apps\tic-tac
> react-scripts start

'react-scripts' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! tic-tac@0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the tic-tac@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

I also installed a tutorial 'React For Beginners' in another directory in Dropbox and it works fine.

Thanks

Doak
  • 41
  • 1
  • 1
  • 4
  • Ok, so you have it running on your desktop, but want it to also run on laptop. This is a rather weird problem. But first you probably need to check if your NodeJS version is the same between the computers or not. – ionizer Mar 19 '18 at 16:54
  • Try with `npm start` [doc](https://github.com/facebook/create-react-app#quick-overview) – Gabriel Bleu Mar 19 '18 at 16:56
  • You need to run `npm run build` inside client directory where `pacakge.json` is – Aaqib Mar 19 '18 at 16:59
  • Just looked around Google search. Take a look at this similar problem to yours: https://stackoverflow.com/questions/46638007/adding-dependency-gives-error-react-scripts-is-not-recognized-as-an-internal ...you probably need to use `npm start` instead. If this still fails, deleting `node_modules` and performing `npm install` once more might help. – ionizer Mar 19 '18 at 17:00
  • Node 9.8.0 on both computers. – Doak Mar 19 '18 at 17:56
  • Node 9.8.0 on both computers. 'npm start' works on desktop, not on laptop. 'npm run build' inside tic-tac directory, same error message on laptop. Ran 'npm install' in tic-tac directory, then 'npm start', same error message. Is there corruption on the laptop? – Doak Mar 19 '18 at 18:02
  • I found the solution. You need to do a local install...npm install --save react react-dom react-scripts. The tutorial has you do a global install, which will not work per https://stackoverflow.com/questions/39959900/npm-start-error-with-create-react-app/39960523#39960523. – Doak Mar 19 '18 at 22:10

0 Answers0