I have experience developing ReactJS apps on Windows (with VSCode and Git/Sourcetree), but I have never used Linux/Mac.
Now I'm going to work (temporarily) with a team who are working on a huge/mature ReactJS project. The problem is they're all on Linux and Mac (they use Git too).
I am hoping to be able to just use my Sourcetree and VSCode and everything on Windows, but I imagine at least the scripts in their package.json won't easily run on my Windows machine?
If anyone has faced a similar situation I would really appreciate some advice so I could prepare.
To work on a project developed on Linux, and make Linux commands from the package.json scripts run on Visual Studio Code on Windows:
Install Git for Windows
Set VSCode to use Bash
Run this command to make npm scripts run in Bash:
npm config set script-shell
"C:\Users\hardi.sempuno\AppData\Local\Programs\Git\bin\bash.exe"
(To undo this: npm config delete script-shell)
Related
I am making an application using ElectronJS and I am facing an issue.
FYI: I am using electron-react-boilerplate for my application. And I use a npm library called iohook to catch all the system inputs like key pressed etc..
So, I create ".deb" file for my linux using:
npm run package --linux
After this, I install the generated file using
sudo apt install ./fileName
Now, when I try to open this installed application by clicking on it it does not open. But when I comment all the code in "main.ts" file which is related to "iohook" and then create a build and install the application in system it opens up perfectly.
So, the main issue is the "iohook" library is not running in the production environment but runs perfectly in the development. What should I do to make it run in production as well?
Electron version: 8.5.2
iohook version: ^0.9.3
I cannot use higher(or latest) version of Electron or else I get issues because of version incompatibility.
Edit: Here is the link to the project repo
https://gitlab.com/vgoyal23/electron-apps
Found the answer in the issue below. I had to add iohook not just to /package.json but also in the /release/app/package.json.
Refer this issue https://github.com/wilix-team/iohook/issues/414
I'm trying to install react-native app on ios emulator but i have an error say it have no podlock, so i find solution here No `Podfile' found in the project directory
but i ran into a problem when i try to pod install in ios folder, it show like this
Please help, i'm totally new to mac, i never using mac before, thank a lots
There are some Libraries that break with pods with arm-64 MacBook pro's. I have faced the same issues while setting up with React-Native. You can duplicate your terminal and enable the open with the Rosseta option. This option will run the pods using the Rosetta emulation. There are still many libraries that break on the new MacBook Pro.
You can follow this link for adding a duplicate terminal that uses Rosetta: Adding Rosseta Terminal
I solved, it turns out this folder is read-only, don't know why but it was a document folder, I move the project to the top level of the document, like document/project, and it works, but place project in document/a/b/c/project it not work, so weird, still looking for an answer.
I fixed it by running pod install with the parameter --project-direcotry=~/<path-to-my-project> like this:
pod install --project-directory=~/<path-to-my-project>
Also, if you need to run npx install-expo-modules, could be achive by it:
npx install-expo-modules ~/<path-to-my-project>
Apparently, the simple fact to set relative path solved it ;)
I have several simple React projects that I have built using create-react-app on Windows 10 and wish to transfer them to my Linux development system. I don't think it's as simple as zip and unzip. Can someone suggest the appropriate way to do this? Or should the above mentioned zip/unzip work? Thanks in advance.
As long as you get the source code over, anything is fine really. A recommended way of doing that is transferring everything except for the node_modules folder, as running npm install can install OS-specific dependencies as well.
i will just start my question a little bit structured:
background information
I am developing a React App with Electron on my Mac.
The customer uses this app on Windows 7 and 10.
The app is packaged with asar on a gitlab runner within a docker
the dockerfile for the runner is from electronuserland/builder:base
What works?
If I start the App locally I run the npm build script and start electron -> The app works fine!
If I package the App locally (on my Mac) for Windows and copy the .exe to my VM: -> The app works fine!
What does not work?
If my pipeline get triggered by my commit the gitlab runner starts to run the buildscript and the package script (The same ones I run locally for packaging and running my app) The build is "successfully" completed and the artifacts are stored on gitlab.
Then I download the .exe from the gitlab artifacts on my Windows VM and install the software. This absolutely works fine. The app can start up and some functions are pretty good working.
But there is a problem with a package (or maybe some more, i do not know yet) It is the react-bootstrap-daterangepicker. It gives me an JS error with $this.$picker.daterangepicker is not a function
I googled a lot and found existing problems with the package, but I do not understand why it is working when i package the app locally and not with the runner.
I removed my node-modules completey on my local machine and reinstalled them, and it is still working fine.
Do you have any idea?
Where could be a difference between my local environment and the runner environment that can cause this kind of problem?
I am pretty stuck in this problem, and you would be my hero if you can help me to fix this!
Have a nice day!
electron-builder recommends using electronuserland/builder:wine to build Windows targets. I'm not sure if this would fix the problem, but could you try using this image instead?
electronuserland/builder:wine — Wine, NodeJS 10 and required system dependencies. Based on builder:10. Use this image if you need to build Windows targets.
For more information: https://www.electron.build/multi-platform-build#provided-docker-images
I'm having issues setting up React-Native on windows 8.1. I have installed react native with the npm install -g react-native-cli yet when I execute react-native init Myproject I get react-native: command not found. I'm using an elevated Powershell so this is rather frustrating. Need your help
You need to add the global npm directory to your path, which the Windows installer for current NodeJS Long Term Support release (6.10.x) should have done automatically. I'd recommend uninstalling nodejs, and then reinstalling latest LTS release. That should add the path for you automatically, I just verified as such in a Windows 7 virtual machine.
If that didn't add the path for some reason, you can do it manually from the System control panel.