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
Related
I'm having trouble running my appium/webdriver tests on my Windows machine. Seems to be working fine on my Macbook, but despite clearing out the Node modules and reinstalling them on my Windows machine, I'm getting an error message that I'm not sure how to resolve. Hoping someone can point me in the right direction.
PS C:\Users\micro\Documents\GitHub\Saucelabs_Automation> npm run test.doug
> best-practices#1.0.0 test.doug C:\Users\micro\Documents\GitHub\Saucelabs_Automation
> RDC=true npx wdio test/configs/wdio.android.sauce.rdc2.conf.ts
'RDC' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! best-practices#1.0.0 test.doug: `RDC=true npx wdio test/configs/wdio.android.sauce.rdc2.conf.ts`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the best-practices#1.0.0 test.doug script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\micro\AppData\Roaming\npm-cache\_logs\2022-04-08T14_42_34_633Z-debug.log
I am trying to run a react project in my Windows environment but It's throwing the following error. Before, this project worked on Ubuntu with the same things. It started to happen after I changed the OS. How can I fix this?
I am just running npm start command.
> REACT_APP_VERSION=$npm_package_version react-scripts -r #cypress/instrument-cra start
'REACT_APP_VERSION' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! PROJECT NAME start: `REACT_APP_VERSION=$npm_package_version react-scripts -r #cypress/instrument-cra start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the PROJECT NAME start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
UPDATE
I just fixed it with the following package. It is about windows.
https://www.npmjs.com/package/cross-env
Thanks.
Anyone can please help i'm stuck in npm start command
I'm working on node js with typescript - Running Platform Windows 7-64
but it won't start throwing errors
HERE You Can check Files
Log File,package.json,Error Image : https://filebin.net/oebfwc7nln660exp
\NODEJS\project2>npm start
project2#1.0.0 start \NODEJS\project2
nodemon --exec ts-node src/index.ts
Node.js is only supported on Windows 8.1, Windows Server 2012 R2, or higher.
Setting the NODE_SKIP_PLATFORM_CHECK environment variable to 1 skips this
check, but Node.js might not execute correctly. Any issues encountered on
unsupported platforms will not be fixed.npm ERR! code ELIFECYCLE
npm ERR! errno 216
npm ERR! project2#1.0.0 start: nodemon --exec ts-node src/index.ts
npm ERR! Exit status 216
npm ERR!
npm ERR! Failed at the project2#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2020-08-28T19_00_00_536Z-debug.log
After setting NODE_SKIP_PLATFORM_CHECK in environment variables with value 1 it worked on Windows 7.
I have a problem running npm start from my newly created project, the thing is the problem doesn't seem to occur outside of this folder (its a git repo, so it needs to be in here). If i create a new project in another folder and run npm start I have no issues at all.
So I recently started working in Ubuntu 18.04LTS, gone through all the setup of installing nodejs and npm.
Currently running versions:
node = 10.16.0
npm = 6.9.2
So I created my app by using npx create-react-app
When i run npm start inside this, it throws me an error:
sh: 1: react-scripts: not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! frontend#0.1.0 start: `react-scripts start`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the frontend#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
I tried create the app in another folder, testing if i can run npm start (yes) and the move this app to my repo, but then it fails again.
If i understand well what you wrote, "npm start" worked fine when you changed folders. If this is the case, you should know that Node has issues reading the path when some particular characters (like "&") or spaces are in the name of a folder.
Try to change the folder's name.
I faced this problem where it says 'node' is not recognized as an internal or external command,
operable program or batch file. when i try to execute npm start from git bash cli.
$ npm start
> queensland-weather#0.1.0 start C:\Users\Admin\Desktop\react\project
> react-scripts start
'node' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project#0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Admin\AppData\Roaming\npm-cache\_logs\2018-05-16T01_35_47_855Z-debug.log
However, if i execute node -v or npm -v from git bash, it returns me result
Derek MINGW64 ~/Desktop/react/project (master)
$ npm -v
5.6.0
Derek MINGW64 ~/Desktop/react/project (master)
$ node -v
v9.5.0
And if i execute the same thing from windows cmd, it works:
Compiled successfully!
You can now view project in the browser.
Local: http://localhost:3000/
On Your Network: http://192.168.10.1:3000/
Note that the development build is not optimized.
To create a production build, use npm run build.
UPDATE:
Added node and npm into environment variable
I'd been searching for the answer to this and all I got was 'add nodejs to the path', which I had already done (and actually is done by node on installation)
Finally discovered that git bash is sensitive to spaces in the PATH variable.
So... the safest way is to add a slash after the path variable so you are sure that there is no space after "\nodejs" part, i.e.
C:\Program Files\nodejs\
If you have added the path correctly, try installing the nodejs installer with all the features enabled.
Adding this as confirmation of Peter Koopman's answer, which I have upvoted. I had to do exactly the same for a local automation test project using Newman to test an api. As I use git bash for nearly everything and I wanted to run my program from a double-click shortcut