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.
Related
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 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)
I am following this tutoriel to use C library in Kotlin (Android Studio) https://jonnyzzz.com/blog/2018/05/28/minimalistic-kn/ But I can’t find the how to install/download the cinterop tool both in Windows and Ubuntu I have the error “cinterop: command not found” ! Does anybody please knows how to install cinterop ? Thank you in advance
This tool is a part of the kotlin-native distribution, and it does not make any sense to use it without the Kotlin/Native compiler. So, in fact, you would like to get all the distribution here, and install it correctly.There are three main approaches to the Kotlin/Native installation. All of them are described in the documentation.
Installing it with the IntelliJ IDEA. You should just get an IDE and let it install everything on its own. It will download all tools and put them to the following location: ~/.konan/kotlin-native-prebuilt-<osName>-<kotlinVersion>/bin/. Then you will be able to add this folder to your PATH and call the tool from CLI.
Installing using the Gradle build system. Quite similar, but this one will require manual installation of the Gradle. The first run will also download all tools and pack them to the same location as in the IDE case.
Installing the CLI tool. This looks like the most appropriate way to follow the tutorial, but won't help a lot when you start working on more sophisticated projects. In general, you should just download the latest version of the Kotlin/Native, unpack it to some folder and add this folder to your PATH.
We have a react app on a shared repository. However, for some reason it seems like only one person could work on it. When a person works on the project and pushes a new version, and another one of us pulls and run the new version, we get this error:
'react-scripts' not recognised as an internal or external command, operable program or batch file.
I know this can be solved if I do npm install some package, but the fact that we have to do it every time seems to me something is terribly wrong. Our computers are either Linux or Mac, but I don't think its a OS problem since I can be working on Linux and push new files but my partner also with a Linux runs into the problem. Furthermore, we tried syncing our npm and node versions but to no avail.
Any help would be appreciated.
The problem seems to be with the node_modules folder checked-in into your repo.
node_modules are not meant to be checked in into the repo. If you do this, and use the same repo for Linux and Mac, a lot of things can go wrong.
When you run npm install, the installer pulls packages for you, and very often some packages get compiled for your platform after the installation. If someone checks in a package compiled for Mac, it will break on Linux. Also, all symbolic links will be broken.
Add node_modules to gitignore file.
I am using a package named react-native-linear-gradient which can be found here. I had to go through quite a lengthy process to eventually get the link to my project (by manually linking via the Binary link with libraries in XCode. I got it working fine, however, each time I install a new package via NPM, linear-gradient is removed from my node-modules folder.
1.Can anyone shed some light on why this is happening? (Happy to provide additional information)
2.Will this impact deployment of the application if this is not solved?
SOLVED: Downgraded to 5.7.1... It seems 5.8.0 seems to cause the same error Michael mentioned.