Failed to load resource: net::ERR_FILE_NOT_FOUND in electron - electron

I am getting this error for all of my jpg/png/svg files when running the "yarn electron ." command for my project. My react app is working perfectly, in my electron web app everything is working except for the pictures that are not loading. I have no idea what the issue is. Using electron-builder version=22.9.1 os=19.6.0, electron v11.3.0, macOs catalina version 10.15.7

Related

App is not installed using react native command

I have react native cli application and when I tried to run it on simulator using npx react-native run-ios command it builds app successfully, bundler gets started and it shows 100% complete of bundler process but on simulator app is not being installed.
Note: simulator opens automatically but app not installed. When I use Xcode to run app it is working fine
Can you please help me with this.
Video
Thanks
Finally I get it working by clearing all cash using DevCleaner(From app store) also deleted all core simulators and added few again. I specified name of simulator as well with command as npx react-native run-ios --simulator="iPhone 11"

React Native app not running in XCode iOS simulator

I try to make my first steps using React Native. Development for Android (on Windows host) works. Now I wanted to test iOS, and tried to set up a development environment on a MacBook Pro.
Problem: React Native starts the iOS simulator, and then nothing happens any more. The simulator runs OK, but my React native app won't start.
What do I need to do to get my React Native installation going?
More Info:
I set up XCode and React Native according to the docs on the MacBook Pro running OSx 10.13.2 (High Sierra). XCode was installed and tested successfully, including the simulator.
When I installed Node.js I deliberately picked an older version (containing npm 4.2.0), since forums say that React Native does still have problems with npm 5. I also installed Homebrew and Watchman, like stated in the docs.
To initialize an empty project, I used
create-react-native-app HelloWorldProject
and a projet structure got created in my Documents folder.
If I finally fire up my "Hello World" test app using
cd HelloWorldProject
sudo react-native run-ios
the system responds:
Starting packager ...
Starting simulator ...
and then nothing happens. The simulator does indeed start (boot --> apple logo --> progress bar --> IOs start screen), but nothing happens afterwards.
Edit
I have given up on React Native for several reasons, I leave this question here for documentary purposes, but I cannot verify or accept any answer, I don't have a React Native development environment any more.
It's probably because you used sudo. /.expo/ is owned by root. Try to change the ownership with
sudo chown -R `whoami` ~/.expo
Refer https://github.com/react-community/create-react-native-app/issues/422
Even everything in your app seems fine, sometime you face the issue that the app is taking too much time to load either through terminal or Xcode. If there is no any other specific issue with your project, the following solution works most of the time:
Go to your app folder and then go to 'iOS' folder.
Delete 'Podfile.lock' and 'Pods' folder.
Execute the following command in Terminal from your 'ios' folder, that will bring back the 'Podfile.lock' and required Pods will be installed to 'Pods' folder:
pod install
Delete the 'build' folder in your 'iOS' folder.
Run the following command in terminal:
react-native run-ios
While the terminal is running, open '.xcworkspace' in your 'ios' folder in Xcode.
The above steps will make sure it will be build your react native project newly and will run on the simulator.
Thanks
Wasantha Wijayaratna

React Native - Packager very slow

I have a question about speeding up the dev process from react native. If I run react-native run-ios in the project root via terminal. A new terminal-window pops out and the packager is running on port 8081. As well as the packager starts also the simulator.
After a few seconds the package says
React packager ready.
[5:15:59 PM] <START> request:/index.ios.bundle?platform=ios&dev=true&minify=false
[5:15:59 PM] <START> find dependencies
After that it takes about 6-10 minutes that the simulator connects to the packager (during this time the simulator throws a few times erros that he can't connect cause he got a timeout). But after the packager is initialized everything works fine. The app has been started and it's connected to the packager.
Everytime when I install new modules (via npm for example) or remove some files I have to delete the app form the simulator and have to run the react-native run-ios again. Also sometimes when I changed only code. On the other hand sometimes I can change code and can reload via CMD + R in the simulator and everything works as expected.
Can I speedup the packager or is there something which i missed about reloading? I don't have that many modules installed and the project is at the very beginning (very small)

Cordova build iOS App' : "Could not find module 'npm-registry-client' (Node JS)

I try to build my Cordova App' on Iphone without success. Everything is ok with Android and Windows Phone. I always have the same error when I try to build it on Iphone or iOS simulator : "Could Not find module 'npm-registry-client'".
Here's some screens:
PC:
Mac (Remote Build):
I use Visual studio 2015 on Windows PC,Angular JS framework, Npm 2.11.3 and NodeJS 0.12.7 . I've already build a blank Iphone app' with Xcode 7 on my mac. I've tried to remove the node_modules folder and reinstall Npm but it's not working...
Any suggestions?
Thanks for reading
EDIT : SOLUTION
I found the solution. 'npm-registry-client' was installed on my Windows PC but not on my Mac. In terminal,just write "npm install npm-registry-client" and everything works great!! (Emulator and device)
That error is most likely a bad install of Cordova on your Mac. Clearing out the installed Cordova version(s) from ~/.taco_home/node_modules will let the next build reinstall Cordova and should clear up the problem.
It's also possible but less likely that a Cordova install issue happened on your Windows machine instead. Reading the Output panel in VS will tell you if the error happened in the remote build log section or not. If it didn't come from the remote build, then clearing your Cordova cache and your npm cache would be the needed fix.
Hope that helps.

Unable to compile Phonegap app locally

I'm unable to compile my app for iOS locally, Android works OK.
I have installed both cordova and phonegap using npm install -g [...]. I am running OSX (10.7.5).
Version outputs from both:
$ cordova -v
5.1.1
$ phonegap -v
0.9.4
I have XCode installed (v 4.6.2). I also have the command-line tools installed.
Both the cordova and phonegap tools fail to build, seemingly for the same reason. Running phonegap build ios outputs:
$ phonegap build ios
phonegap detecting iOS SDK environment...
phonegap using the local environment
phonegap compiling iOS...
error ENOENT, no such file or directory '/Users/mike/apps/***/platforms/ios/__CLI__/config.xml'
Here is the output from the same cordova command:
$ cordova build ios
cp: copyFileSync: could not write to dest file (code=ENOENT):/Users/mike/apps/***/platforms/ios/__CLI__/config.xml
cp: no such file or directory: /Users/mike/apps/***/platforms/ios/platform_www/*
Parsing /Users/mike/apps/***/platforms/ios/__CLI__/config.xml failed
Error: ENOENT, no such file or directory '/Users/mike/apps/***/platforms/ios/__CLI__/config.xml'
at Error (native)
at Object.fs.openSync (fs.js:500:18)
at Object.fs.readFileSync (fs.js:352:15)
at Object.module.exports.parseElementtreeSync (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/util/xml-helpers.js:118:27)
at Object.ConfigParser (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/configparser/ConfigParser.js:33:24)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:115:32
at Array.map (native)
at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/prepare.js:70:40
at _fulfilled (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/cordova/node_modules/q/q.js:816:30)
It seems to me that there should be some replacement running on __CLI__ in the path that isn't happening, but it's difficult to tell. Below is a screenshot of the file structure this generates:
I am able to build using the remote build service, but it's quite laborious, as the app isn't properly loading so I need to do quite a bit of debugging to sort this out.
Node is installed at version 0.12.5. NPM is installed at version 2.11.2.
I have reinstalled the platform numerous times, and always get this error.
This question is a little old, but I'll throw a few things out there:
I've got a command line build of my ios platform running -- it does not have an __CLI__... subdirectory. Just a data point.
I'm wondering if there isn't something weird with the way Xcode is set up in relation to its build path. See this answer to make sure the output directory is set correctly: still getting <Cordova/CDVViewController.h> file not found error in xcode. I've got a desktop and mobile app set up in Xcode, and I have to remember to switch this setting back and forth.
PhoneGap / Cordova have been phasing out older versions of ios with their newer releases. It would not surprise me if cordova 5.1.1 did not support Xcode 4.6.2. You might want to try with an older release of the cordova library.

Resources