React Native Setup - reactjs

I am new to react native and I am trying to set it up using the tutorial from this youtube video:https://www.youtube.com/watch?v=0-S5a0eXPoc&t=811s
However, I am getting errors whenever I try to run the program.
When I run it using expo start I get this error:
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:127:28)
And when I run it using npm start, i get this:
Error: EMFILE: too many open files, watch
at FSEvent.FSWatcher._handle.onchange (internal/fs/watchers.js:127:28)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # start: `expo start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
I tried some solutions from here: error: This is probably not a problem with npm. There is likely additional logging output above
But they did not work.

Related

ASP.NET CORE with REACT.js npm run build code 1

When the project is trying to be deployed, I get the following Error:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! s2cweb_react#0.1.0 build: react-scripts --expose-gc --max-old-space-size=8192 build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the s2cweb_react#0.1.0 build 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! /home/runner/.npm/_logs/2021-09-08T13_45_58_680Z-debug.log
/home/runner/work/MyProject/MyProjectApp/MyProjectApp.csproj(36,5): error MSB3073: The command "npm run build --prod" exited with code 1.
Error: Process completed with exit code 1.
I tried to change package.json as well as MyProjectApp.csproj but no luck. I Also tried without --prod but the same error persists. Please help me.

react errno 1 failed at the jamming#0.1.0 start script

This may have been asked before however I am trying to open the devleopment site on chrome for my webpage but are getting this issue:
code ELIFECYCLE
npm ERR! errno 1
npm ERR! jamming#0.1.0 start: `react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jamming#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:
This is happening when I type npm start in the command line.
I have no issues opening it on the macbook I created the react file but I am trying to open this on a seperate Mac where I am facing this issue. The files are saved in Icloud so can access on both computers but doesn't appear to show the same information.
Any assistance would be hugely appreciated.
Many thanks

Failed to compile. webpack is not a function

My project was working fine but after installing react-redux and redux i can't start the project it shows me this error
Failed to compile.
webpack is not a function
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project#0.1.0 start: `node scripts/start.js`
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.
The screenshot of error in ternimal
I ran into a problem with this same symptom after upgrading all of my node modules including react and redux, but in particular react-dev-utils to v8.0.0. The createCompiler() function has been changed to expect an object rather than multiple parameters (I guess this will provide greater flexibility in the future).
I changed my start.js from:
const compiler = createCompiler(webpack, config, appName, urls, useYarn);
to:
const compiler = createCompiler({ webpack, config, appName, urls, useYarn });
Simple npm install command worked form me

React app deployment failure on heroku "Failed to minify the code from this file"

I created a react app using the create-react-app command and tried to deploy it on heroku using the directions on https://github.com/mars/create-react-app-buildpack#quick-start
However while trying to push to heroku, I come up with the following Build Fail in which the build log reads:
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/newsapi/index.js:17
Read more here:
https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sports-news-app#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sports-news-app#0.1.0 build 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! /app/.npm/_logs/2018-08-15T03_41_33_617Z-debug.log
! Push rejected, failed to compile React.js (create-react-app) multi app.
! Push failed
newsapi/index.js at line 17 reads
let API_KEY; // To be set by clients
It's hard to say what the error could be without seeing newsapi/index.js. It is possible that the file includes syntax that is not supported or fails to be minified. One solution is to see if that line is an import, and create a local version of that dependency with the offending syntax removed or updated.

create-react-app npm run build fail to minify watson node sdk

I am new to React and I am trying to build a react app using create-react-app and Watson node-sdk. Everything works fine in development mode after running npm start. But when I try to build a production package using npm run build and below is the error I receive.
e:\Microsoft\Workspace\React\myapp>npm run build
> myapp#0.1.0 build e:\Microsoft\Workspace\React\myapp
> react-scripts build
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/watson-developer-cloud/lib/helper.js:31
Read more here: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! myapp#0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the myapp#0.1.0 build 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\yk\AppData\Roaming\npm-cache\_logs\2017-09-
20T09_40_36_144Z-debug.log
The line that giving error is let missing; and seems like the let is causing the issue. Is there anything I can do with this?
Encountered this problem today. the doc suggests some solutions:
Open an issue on the dependency's issue tracker and ask that the package be published pre-compiled.
Fork the package and publish a corrected version yourself.
If the dependency is small enough, copy it to your src/ folder and treat it as application code.
Read more here: https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify

Resources