I have a file here:
/Users/myName/Desktop/KMtoMiles/platforms/ios/www/js/app.js
I make a change to the file using Xcode. Then I click save changes and exit Xcode. If I immediately re-enter Xcode, I can see my change is there.
Then I do the following:
myNameMBP:Desktop myName$ pwd
/Users/myName/Desktop
myNameMBP:Desktop myName$ ls
KMtoMiles
myNameMBP:Desktop myName$ cd KMtoMiles/
myNameMBP:KMtoMiles myName$ ionic build ios
Now when I open Xcode and go to app.js, my changes are no longer there.
I have had issues with permissions. I ended up just making it wide open and doing chmod -R 777 KMtoMiles and it appears the permissions may be changing when I do a build.
Has anyone experienced this too?
Ionic build iOS project automatically from the existing source, so If you need to modify any f your files go to the source and modify files there then build iOS you will get the files changed within Xcode.
-- EDIT --
So you need to edit the source files first before building your project, don't edit files directly on xcode as ionic build ios command will ignore your edits and replace files with the source files.
Related
I am working on a project that uses both React and Springboot apps, so I have individual folders for each of those and am trying to get them both into my github repo. I was easily able to drag and drop the springboot folder, but my react one does not upload at all when I drag it into the upload box. Is there an easy terminal command in vs code (the editor I'm using) to add the entire folder?
Since you want to add your 2 different projects in 1 repository, you can firstly put both of your project folder inside 1 main folder, example:
MyFolder:
- MyReactProject
- MySpringbootProject
here MyFolder is your main folder, which has both of your projects, react and springboot.
then finally make a file inside MyFolder with name .gitignore, and put this line inside that file:
**/node_modules
what this file will do, is when you will push your code to github, it will ignore all the files and folders which are listed inside .gitignore file.
You Don't Need node_modules folder
when uploading your code somewhere online, you don't need to upload the node_modules folder, because this folder contains all the dependencies your project need, but when uploading your code online people can download those dependencies by calling the command npm install which will read all the modules needed from your package.json file, and download it on your machine.
To upload your code online you first have to authorize yourself on your local git program, to authorize yourself for github you can read this Article.
After authorizing yourself, firstly make a new empty github repository, by going to github or just by clicking this Link, after making a github repository open Terminal/Command Prompt in your Folder where both of your projects were, in this context my both projects were in MyFolder.
After opening Terminal/Command Prompt enter this commands:
git init
git branch -M main
git add .
git commit "Added all the files"
After running these commands, finally run these 2 final commands:
git remote add origin https://github.com/username/repository-name.git
here, replace username with your github username, and replace repository-name with the name of your repository you specified while make a new repository.
and finally run this command
git push -u origin main
and your code should be pushed on github.
If you don't want to use git commands you can also use, Github Desktop, but it is recommended you first learn basics of git and then use github desktop
I was following this react course from YouTube.
I installed the create-react-app successfully and also ran the localhost server successfully on my browser afternpm start.
But the problem is that whenever I make a change in the component and save, I have to keep refreshing the browser by myself (browser is not refreshing automatically on save). But the browser of the teacher in that video refreshes automatically.
Please help me. Am I doing something wrong? or what should I do?
I think the best option is to use: npx create-react-app your-app-name when creating your apps so you can always have the most updated version. As per the docs: https://reactjs.org/docs/create-a-new-react-app.html
The best option would be to create your project in a C-drive ( any directory/folder in C drive), where your node packages were installed during the first setup of the node. I had a similar issue when my project was in D-Drive's Directory but switching to C Drive's Directory "C:\Users\USERNAME\Documents\ReactProjects\frontend\src" fixed my issue.
There might be different reasons why this is happening. Try one of the following solutions:
1 --> Increase the maximum number of allowed watchers in your linux environment. This is a known issue when running webpack inside of a VM like WSL2, as it happens when you execute npm start. To do so, issue the following commands in your terminal:
sudo nano /proc/sys/fs/inotify/max_user_watches
Replace the number you see with 1048576 and save the file. Then type exit and relaunch the terminal. Try npm start inside of your project folder again.
2 --> If the above didn't work, try setting the CHOKIDAR_USEPOLLING=true environment variable in your linux environment, which will reflect on your react development environment. Normally you would put this in a .env file inside of your project folder, but adding the variable to your .bashrc file will make it work with any React project you are working on. If you are only experimenting with React for now, I would recommend this solution. This change is unfortunately necessary when working inside of a virtual machine like WSL. Add the line export CHOKIDAR_USEPOLLING=true at the end of your .bashrc file. To edit your .bashrc file:
sudo nano ~/.bashrc
Then save the file and exit/relaunch your terminal. Try npm start inside of your project folder again. Hopefully this should fix it.
I have a C project on Eclipse. After a successful build, I carry (cut and paste) the intermediary files (generated makefiles, object files and etc) to a specified folder by a post-build script.
When I press clean project button, the compiler does nothing normally. This is ok but my problem is how can I clean the content of my specified folder? Is there anything to be modified in order to customize clean command? Can I trigger a script when I press this button? Any other solutions exist?
Open your .cproject in text editor. Search for cleanCommand=. Once found, edit the command in quotes.
I'm using Intellij Idea 15.0.3. I tried to use it to develop a MEAN stack application.
I first File -> New -> Project -> Empty Project to create an empty project. Then in Intellij Idea's terminal I type npm init -y, a package.json is generated. However, when I tried to edit this generated package.json, a window pops up, saying: These files do not belong to the project, and asks me if I want to edit it anyway.
Also, after I edited the package.json, I run npm install in the terminal, a new directory node_modules is generated, but it's not shown in the Intellij Idea.
How can I add package.json and node_modules into project? Do I have to manually created file or folder through Intellij Idea project UI and give up using its terminal?
You need to create a new project from existing source so..
File->New Project - Select HTML5/Javascript application then select one of the options at the bottom with "Existing Sources" at the end of it, you then just specify the folder that it's already and in and you should be good to go.
I know Sencha is hard to learn, but I can't even get to first base and generate a starting App and I'm sure I'm not the only one!!! I have downloaded Sencha Touch SDK 2.3.1 (latest version) and Sencha CMD 5.0.1 (latest version). I have navigated to the Sencha Touch directory and typed in the command EVERYONE says to use to generate an app which is: sencha generate app MyApp ../MyApp On my mac I get errors as Sencha CMD tries to install the working directory and the SDK files. Is this a mac problem or am I missing something here?
Here is what I get:
[ERR] Directory /Users/Adam/Documents/Websites/touch not recognized as a framework
[ERR] Directory /Users/Adam/Documents/Websites/touch not recognized as a framework
[INF] Processing Build Descriptor : default
[INF] Loading app json manifest...
[INF] Concatenating output to file /Users/Adam/Documents/Websites/build/temp/production/myApp/sencha-compiler/cmd-packages.js
[INF] writing content to /Users/Adam/Documents/Websites/MyApp/bootstrap.js
[INF] appending content to /Users/Adam/Documents/Websites/MyApp/bootstrap.js
[INF] appending content to /Users/Adam/Documents/Websites/MyApp/bootstrap.js
[INF] appending content to /Users/Adam/Documents/Websites/MyApp/bootstrap.js
[INF] Appending content to /Users/Adam/Documents/Websites/MyApp/bootstrap.json
Also, the build and touch directories don't end up in the MyApp directory but instead one level up. So frustrating. Any help from anyone familiar with Sencha would be greatly appreciated. Thank you
I totally understand your frustration - 2 days is a long time to be stuck. Sencha can be so confusing....big learning curve!
In this situation you are better off changing your generate app command to specify the path to the touch directory and before generating the app, I would suggest you ensure you haven't already accidentally created an app in the websites folder, as this will throw you another error.
So, assuming your directory structure has websites/touch and you want your application generated in websites/myapp, I would suggest the following:
Ensure you are in your websites directory
check for hidden .sencha folder by typing ls -a
if it exists, remove it by typing rm -r .sencha
Create the folder you wish to generate your app into (eg: myapp)
change to that directory (cd myapp)
generate your app (sencha -sdk ../touch generate app MyTestApp .)
note: "../touch" is pointing to the touch directory in the parent folder
note: "MyTestApp ." is telling the system to generate an app called MyTestApp in the current folder.
See how you go with this - hope it helps!