Clone and setup Repository from Bit Bucket to XCode - xcode

joined a new organisation. Never worked on react native repositories before.
I need a quick help on how to clone a React Native repository from bit bucket to Xcode and setup to work only on iOS module.
I have downloaded the repository and open the iOS Folder and opened projectname.xcworkspace file. It opened my project but so many files are missing. So I assume that it is not the right way to do. Please help.

I think you didn't use command of npm install or yarn install then after completed the above command you need to use cd ios(Go to ios directory) and pod install then you should open your projectname.xcworkspace file.
if you have package-lock.json then use npm install and if you have yarn.lock then use yarn install command.

Related

Error:'darwin-x64' binaries cannot be used on the 'darwin-arm64v8' platform

I am facing this error when I am trying to do a git push on Intellj.
It's a similar issue to this one but opposite ( That one is 'darwin-x64' binaries cannot be used on the 'darwin-arm64v8')
I have tried all the solution from that post but the git push still throwing the same error.
Below is the error I recevied when I do a git push.
Error in "/Users/xxx/Projects/cpss/node_modules/gatsby-transform
er-sharp/gatsby-node.js": 'darwin-x64' binaries cannot be used on the
'darwin-arm64v8' platform. Please remove the 'node_modules/sharp' directory and
run 'npm install' on the 'darwin-arm64v8' platform.
Error:'darwin-x64' binaries cannot be used on the 'darwin-arm64v8' platform.
Please remove the 'node_modules/sharp' directory and run 'npm install' on the
'darwin-arm64v8' platform.
I have tried to delete the node_modules/sharp and run npm install but it does not work.
Can someone explains to me how can I run npm install on 'darwin-arm64v8' platform?
Thank you.
The answer here resolved it for me:
Run brew reinstall vips. Then delete the node_modules folder and install all dependencies again (with npm install or yarn).
delete the node_modules/sharp and run npm install --arch=arm64 --platform=darwin sharp
https://sharp.pixelplumbing.com/install#cross-platform

Yarn install trigger all scripts in my package.json, it is normal?

The documentation doesn't mention this specifity:
yarn install is used to install all dependencies for a project. This
is most commonly used when you have just checked out code for a
project, or when another developer on the project has added a new
dependency that you need to pick up.
Yarn install : Install all the dependencies listed within package.json in the local node_modules folder.

Gulp didn't install on Laravel Homestead VM (from Windows) and no node_modules folder exists in the directory with package.json?

I got Laravel Homestead up and running, except when I issue this ssh command:
gulp
I get this error:
Local gulp not found in ~/projects/laravel
Try running: npm install gulp
That's when I noticed there was no node_modules folder at all in this directory. Weird. Is this an issue where the paths were too long for Windows when I did a vagrant up? Since the host machine for this VM is Windows and I'm sharing folders with my VM (actually I'm not, but rather I'm using phpStorm's sync so that pages will load faster on the VM), when I do a npm install am I still going to encounter the problem? Hmm...I guess Taylor Otwell is using a Mac for development. Anybody have a solution to this?
You should first install node in your local machine.
Then, navigate to your project folder and delete node_modules directory.
Run on your local machine inside project directory:
npm install gulp --save-dev
Solved it!
Yes it appears to be that some of these paths from these package installs are too long for Windows. This means you can only install the gulp package after your VM is up. Here's what I did: (I also include a step for use with phpStorm already (since it will keep server pages loading faster on the VM)
SSH into the VM and create a folder called node_modules in your project's directory (the directory where package.json is).
In phpStorm, go to File > Settings > Build, Execution, Deployment > Deployment and click on the Excluded Paths tab. Click the Add deployment path button and add the folder node_modules from step 1.
SSH back into the VM and in your projects folder (should be directory folder with package.json) and run this command: npm install. This will install all packages listed in your package.json file locally to the directory you are in, and will put the necessary files into the folder node_modules.
Now run the gulp command: gulp
UPDATE:
If you really prefer file-sharing through a mounted folder, then I've created a Gist that will guide someone through all the challenges I faced and had to resolve, including how to successfully run npm install in the guest environment:
Laravel Homestead for Windows (includes fixes)

Node.js/Windows error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm'

I have Windows 7 32-bit. I installed the latest Node.js 32 bit.
When I try to run the command npm install jquery, I receive the error:
Error: ENOENT, stat 'C:\Users\RT\AppData\Roaming\npm
How does one resolve it?
Manually creating a folder named 'npm' in the displayed path fixed the problem.
More information can be found on Troubleshooting page
I ran into the same problem while installing a package via npm.
After creating the npm folder manually in C:\Users\UserName\AppData\Roaming\ that particular error was gone, but it gave similar multiple errors as it tried to create additional directories in the npm folder and failed. The issue was resolved after running the command prompt as an administrator.
This can also be fixed by installing a node package manually.
npm install npm -g
The process of doing that will setup all the required directories.
I recommend setting an alternative location for your npm modules.
npm config set prefix C:\Dev\npm-repository\npm --global
npm config set cache C:\Dev\npm-repository\npm-cache --global
Of course you can set the location to wherever best suits.
This has worked well for me and gets around any permissions issues that you may encounter.
You can go to the Start Menu and search the Node.js icon and open the shell and then install anything with
install <packagename> -g
Install a stable version instead of the latest one, I have downgrade my version to node-v0.10.29-x86.msi from 'node-v0.10.33-x86.msi' and it is working well for me!
http://blog.nodejs.org/2014/06/16/node-v0-10-29-stable/
I needed a package from github that was written in typscript. I did a git pull of the most recent version from the master branch into the root of my main project. I then went into the directory and did an npm install so that the gulp commands would work that generates ES5 modules. Anyway, to make the long story short, my build process was trying to build files from this new folder so I had to move it out of my root. This was causing these same errors.

install npm module in my project

I have node.js project on drive "F".
for example F:\development\WebStormProjects\test-app\
so, how i can install nmp module (npm install twitter-bootstrap-node) in that project folder?
my os is windows.
Thank's in advance.
You can either add the module as dependency to your package.json or install it manually. In any case, typing above command in the command line while being in your project directory should have the desired effect.
If you've added a module as dependency then a simple npm install from the project root should suffice.
EDIT: Global installation of modules is not the default, if you were worried about this. You have to actively trigger it with npm install -g $MODULE_NAME

Resources