Running react-native apps on iOS emulators - javascript

So I am trying to run a simple react-native app on an iPhone 11 - 13.2.2 emulator.
I type npm run ios but I get this back.
** BUILD FAILED **
The following build commands failed:
CompileC /Users/theodosiostziomakas/Desktop/React-Native/confusion/ios/build/confusion/Build/Intermediates.noindex/confusion.build/Debug-iphonesimulator/confusion.build/Objects-normal/x86_64/AppDelegate.o /Users/theodosiostziomakas/Desktop/React-Native/confusion/ios/confusion/AppDelegate.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/theodosiostziomakas/Desktop/React-Native/confusion/ios/build/confusion/Build/Intermediates.noindex/confusion.build/Debug-iphonesimulator/confusion.build/Objects-normal/x86_64/main.o /Users/theodosiostziomakas/Desktop/React-Native/confusion/ios/confusion/main.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! # ios: `react-native run-ios`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the # ios 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! /Users/theodosiostziomakas/.npm/_logs/2019-11-16T12_38_06_754Z-debug.log
I used npm install but still nothing. How to fix that error?
Thanks,
Theo.

alternatively you can run from the workspace file, sometimes running from npm in ios will not give you the exact error.
You have to run the following file in your workspace and select the simulator/iphone and finally launch the project.
Path to the workspace :- ProjectFolder/ios/projectname.xcworkspace

Related

electron forge not making exe

im useing the latest version of electron forge to make my app, so to make sure that the setup worked i ran the make command and it didn't work.
error:
PS D:\javascript\testing\New folder> cd my-app
PS D:\javascript\testing\New folder\my-app> npm run make
my-app#1.0.0 make D:\javascript\testing\New folder\my-app
electron-forge make
✔ Checking your system
✔ Resolving Forge Config
An unhandled rejection has occurred inside Forge:
Error: Could not find module with name: #electron-forge/maker-squirrel. Make sure it's listed in the
devDependencies of your package.json
at _default (D:\javascript\testing\New folder\my-app\node_modules#electron-forge\core\src\api\make.ts:132:15)
at D:\javascript\testing\New folder\my-app\node_modules#electron-forge\cli\src\electron-forge-make.ts:44:5
Electron Forge was terminated. Location:
{}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-app#1.0.0 make: electron-forge make
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-app#1.0.0 make 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\nycas\AppData\Roaming\npm-cache_logs\2021-09-04T01_06_58_366Z-debug.log
PS D:\javascript\testing\New folder\my-app>
i have #electron-forge/maker-squirrel and its a brand new project that I literally just made
help is appreciated.

Gatsby WorkerError:

Im new at Gatsby , when I try to start the Gatsby project gatsby develop --port 8080 , I'm meeting the following error:
WorkerError: Processing C:/Users/AOmurzakov/Desktop/Job/landings/packages/project-business/.cache/gatsby-source-filesystem/6e42032743dd2dda7e331865dd496bd9.png failed
Original error:
jobs-manager.js:314 exports.enqueueJob
[landings]/[gatsby]/dist/utils/jobs-manager.js:314:23
runMicrotasks
task_queues.js:93 processTicksAndRejections
internal/process/task_queues.js:93:5
not finished run queries - 2.879s not finished Generating image
thumbnails - 2.859s
pages
In Progress
#project/businessnpm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR!
lerna# project-business: cd packages/project-business && gatsby
develop --port 8080 npm ERR! Exit status 1 npm ERR! npm ERR! Failed
at the lerna# start:project-business 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\AOmurzakov\AppData\Roaming\npm-cache_logs\2020-02-12T05_22_16_490Z-debug.log
PS C:\Users\AOmurzakov\Desktop\Job\landings>
I was trying to delete .cach by gatsby clean . It didnt work
Also I was trying to start the project with
12 and 10 version of Node
But it had no effect , same error. Can someone advise ?
Following this GitHub comment and the one above it.
I ran the following commands and it solved the problem in my case.
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install
npm run dev

NPM module install error "code ELIFECYCLE" " errno 4058"

Error:
Every time I try to install some module using npm I get this output log in console:
1:C:\Windows\system32>npm install -g serialport
2:"CALL "C:\Users\<user>\Documents\nodejs\\node.exe"
3:"C:\Users\<user>\Documents\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g" is not recognized as an
4:internal or external command,
5:programa o archivo por lotes ejecutable.
6:npm WARN registry Using stale data from https://registry.npmjs.org/ because the host is inaccessible --
7:are you offline?
8:npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during
9:revalidation.
10:
11:> #serialport/bindings#8.0.6 install
12:C:\Users\<user>\AppData\Roaming\npm\node_modules\serialport\node_modules\#serialport\bindings
13:> prebuild-install --tag-prefix #serialport/bindings# || node-gyp rebuild
14:
15:npm ERR! code ELIFECYCLE
16:npm ERR! syscall spawn C:\Windows\system32\cmd.exe;C:\Python34;
17:npm ERR! file C:\Windows\system32\cmd.exe;C:\Python34;
18:npm ERR! path C:\Windows\system32\cmd.exe;C:\Python34;
19:npm ERR! errno -4058
20:npm ERR! #serialport/bindings#8.0.6 install: `prebuild-install --tag-prefix #serialport/bindings# ||
21:node-gyp rebuild`
22:npm ERR! spawn C:\Windows\system32\cmd.exe;C:\Python34; ENOENT
23:npm ERR!
24:npm ERR! Failed at the #serialport/bindings#8.0.6 install script.
25:npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
26:
27:npm ERR! A complete log of this run can be found in:
28:npm ERR! C:\Users\<user>\AppData\Roaming\npm-cache\_logs\2020-01-25T14_44_28_892Z-debug.log
(Note that the line enumeration in this output was hand made and doesn't correspond with the actual output lines. It's just for pointing out things better)
Hightlights:
npm ERR! code ELIFECYCLE
npm ERR! errno -4058
npm ERR! Failed at the #serialport/bindings#8.0.6 install script.
This error pops specifically when I try to run the command npm install -g <module> or even just npm install <module> for when I want to do it locally.
Also
The output log that you can see between the lines 2 and 4 is something that I get every time I try to run a npm command, independently if it is "npm install " or any other.
Example:
C:\Windows\system32>npm -v
"CALL "C:\Users\<user>\Documents\nodejs\\node.exe" "C:\Users\<user>\Documents\nodejs\\node_modules\npm\bin\npm-cli.js" prefix -g" npm' is not recognized as an internal or external command, operable program, or batch file.
6.13.6
As you can see in this and the previous example: even though I get this error message, the command is executed anyways in after said error.
Extra info
I have installed Node.js in custom location C:\Users\<user>\Documents\nodejs instead of C:\Program Files\nodejs
I have never faced this issue when I installed Node.js before in this computer.
NPM cache log: https://drive.google.com/file/d/1DOd4uYVjn_ko3ZWZOM8ceavx8w_yYSWY/view?usp=sharing
OS:----------- Windows 10
Node.js:----- v13.7.0
NPM: --------- v6.13.6

Using reactNative with GitHub and mixing between MAC and PC?

Someone how has got problems when using reactNative with GitHub and mixing between MAC and PC? We got problems when cloning a repository
After typing npm start we get following error message...
react-native-scripts start
sh: /Users/juliafalk/Desktop/J3/node_modules/.bin/react-native-scripts: Permission denied
npm ERR! code ELIFECYCLE
npm ERR! errno 126
npm ERR! J3#0.1.0 start: react-native-scripts start
npm ERR! Exit status 126
npm ERR!
npm ERR! Failed at the J3#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! /Users/juliafalk/.npm/_logs/2018-03-28T07_09_02_393Z-debug.log
student251-74:J3 juliafalk$
This only occurs between MAC and PC and not between MAC and MAC or PC and PC.... Anyone that have had the same problem and that have any solutions for this??

Error when using npm vue-cli

Windows 10
node v8.9.2
npm 5.5.1
installed vue-cli through the use of npm but entering 'npm run dev' resulted in an error.
this is error message
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webpack-simple#1.0.0 dev: `cross-env NODE_ENV=development webpack-dev-server --open --hot`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webpack-simple#1.0.0 dev 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\hansol\AppData\Roaming\npm-cache\_logs\2017-12-08T04_14_50_859Z-debug.log
It appears as though you havent installed the node modules / dependencies.
Please try and run a
npm install
And see if that works
I used to face this problem when the port is busy.
So confirm the port you are opening for the dev server.
you can also change the port using a flag "--port 3000".

Categories