I have a simple react app. It uses:
react
webpack
redux
css-modules
Was looking for an easy way to wrap a React app into Electron.
Am trying out webview
Have a simple electron app
It works on OSX but not on Windows 10,
Please help.
It opens up the Electron app but nothing is visible in the webview
I have opened devtools in both the Electron renderer process and the webview,
but i do not see any error messages
I have tried:
electro-forge
electron and electron-packager
steps to run the app
install the global dependencies:
install node LTS ie. v6.9.2
install electron-forge with "npm install -g electron-forge"
run the React app:
git clone https://github.com/deepak/react-todo
cd react-todo
npm install
npm start
open "http://localhost:3000/todo" and "http://localhost:3000/" on the browser and checks that it works
run the Electron app:
git clone https://github.com/deepak/electron-webview-todo
cd electron-webview-todo
npm install
npm start (works on OSX but not windows 10)
we are using electron-forge here
try the same with plain Electron at the use-electron-packager-and-not-electron-forge branch
I was loading "http://0.0.0.0:3000"
It works when i load "http://localhost:3000/" instead
Related
Can't figure what's wrong in my electron project. Starting with electron . will fail with one native module (pkcs11js). See image :
But running npm run dist will build installer just fine, and running this installer work's fine and app is starting/workin like charm !
PS C:\Users\esa\devel\netauth\client> npm run dist
> Yubiconn2#1.0.0 dist C:\Users\esa\devel\netauth\client
> electron-builder -w --x64
• electron-builder version=21.2.0 os=10.0.18362
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist\builder-effective-config.yaml
• rebuilding native dependencies dependencies=pkcs11js#1.0.18 platform=win32 arch=x64
• packaging platform=win32 arch=x64 electron=6.0.7 appOutDir=dist\win-unpacked
• building target=nsis file=dist\Yubiconn2 Setup 1.0.0.exe archs=x64 oneClick=true perMachine=false
• building block map blockMapFile=dist\Yubiconn2 Setup 1.0.0.exe.blockmap
and this was fine before today when I upgraded all outdated npm packages up-to-date. And nodejs too. This is Win10 env. My OsX env will work without any problem.
I have tried :
rm -rf node_modules; npm install
npm rebuild
even installing electron-rebuild and running .\node_modules\.bin\electron-rebuild
I understand electron-builder will rebuild all native dependencies for distribution. How to make same with development env (electron . or npm start)
I think you need to update node.js. See the part of your error about NODE_MODULE_VERSION
This explains the value of NODE_MODULE_VERSION https://nodejs.org/en/download/releases/#ref-1
I am native iOS app developer but i also want to be aware of latest and trending technology so i choose to get my hands on react native. Now, i am getting this error when trying to run my react native created app on iOS. I enter the command react-native run-ios and simulator started and after that app opened but in starting it showed this screen.
There are couple of solutions available in the link below. Please try them.
https://github.com/facebook/react-native/issues/21310
for now after react-native init, since a lot of new changes are coming out, this fix worked for me (I got it from reading other issues):
with npm:
npm install --save-dev #babel/core
npm install --save-dev #babel/runtime
or with yarn:
yarn add --dev #babel/core
yarn add --dev #babel/runtime
if on ios you get _this._registerEvents is not a function, after a successful build
do
npm run start --reset-cache
or
react-native start --reset-cache
For me i got reason for issues that for now since a lot of new changes are coming out like Xcode 10 itself is new and react native is not yet merged with that, this fix worked for me:
with npm:
npm install --save #babel/runtime
or with yarn:
yarn add #babel/runtime
I was wondering, how can I start to write an Electron app using the Hyper.js sources?
I am new to both Electron and Hyper, and watched a few videos on building an Electron app. But I can't quite figure out how to start the Hyper app. For instance, which is the "main" file in the sources?
Alright, after more reading and getting familiar with Node.js and Electron apps, the following procedure works:
git clone https://github.com/zeit/hyper
cd hyper
npm install
A lot of packages will be installed in a subdirectory called node_modules, then:
yarn run dev
And (in a separate terminal window):
yarn rup app
This will open an Electron app similar to the original one built by Hyper.
Electron version: 0.37.5.
Operating system: OSX 10.11.4
I'm using the X509 (https://www.npmjs.com/package/x509) module which works fine outside of electron. I suspect it could be due to the underlying dependance on openssl.
I followed the instructions here https://github.com/electron/electron/blob/master/docs/tutorial/using-native-node-modules.md to but the module is still crashing electron.
npm install --save-dev electron-rebuild
# Every time you run "npm install", run this
./node_modules/.bin/electron-rebuild
# On Windows if you have trouble, try:
.\node_modules\.bin\electron-rebuild.cmd
I am trying to create a new project, following:
$ phonegap create test com.temp testX
$ cd test
$ phonegap build ios
$ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
The plugin (device) is successfully downloaded to test/plugins/, but not successfully install to test/platforms/ios/testX/Plugins/. Opening the project in Xcode will show those files are missing. Manually copy and reference them won't completely fix it.
What is the cause of this?
PS: It works if I dont specify the project's name:
//project name will be HelloWorld.xcodeproj
$ phonegap create test
Add the plugin before you build iOS by switching the order of your last 2 commands
Hi "git" is also a node module. Simplest way want i found is.
npm install -g git
This will install git in you node source location as a module.
Restart the machine.
Install phonegap plugin:
C:\Users\user1\yourprojectname>cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git
You will get response as:
Fetching plugin from "https://git-wip-us.apache.org/repos/asf/cordova-plugin-cam
era.git"...
Starting installation of "org.apache.cordova.camera" for android
Preparing android project
org.apache.cordova.camera installed on android.
Hope this will be very helpful. If any issue reply.