I have a nativescript project where I deleted the hooks and platform folder to run a tns install again. This time the hooks folder never came back.
How do I get the hooks back? It seems to be causing problems where my app doesn't refresh correctly anymore when I make changes to typescript files.
Just delete node_modules folder and run npm i and the hooks will be recreated.
rm -rf node_modules platforms hooks
npm i
Related
I was made easy blog on Laravel Framework and now it is finished. But I am new guy in this. So the question how to deploy my project? The Vendor and ClockWork folders has thousands of files. I think that it should not to upload to the server. Am I wrong?
The project will not work without vendor dependencies, but true - sending it all over SSH is quite long and archive will be huge - uploading them every time by yourself will be annoying. Usually, you do not upload vendor and node_modules folders to the server, but run:
composer install --optimize-autoloader --no-dev
npm install && npm run build && rm -R node_modules
Read more details in Laravel's deployment section
maybe try to compress the project to a zip file
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.
A quick question about yarn and yarn.lock in a team setting. When someone updates yarn.lock in git, what is the procedure for developers?
Does yarn automatically figure out that the lock file is newer than node_modules and "figure it out", or do people remove their local node_modules and rerun yarn install?
Yarn won't do any check on node_modules folder when yarn.lock is updated via VCS.
To align node_modules folder with the dependencies listed in yarn.lock, there is no need to delete the folder. Run yarn command instead.
When I run yarn install (or just yarn for short) and I don't have a yarn.lock file yet, will the result depend on what packages are already installed in my node_modules directory? Or will node_modules end up in the same state regardless of what's already in there?
In other words, do I need to run rm -rf node_modules "just in case" before running yarn, to make sure that I get the latest versions?
yarn seems to wipe node_modules, generate a lockfile, then download everything without lockfile for me (0.18.1).
If I then modify node_modules, further yarn calls don't do anything, but adding a dependency introducing a change to the lockfile then calls it to wipe my node_modules again.
(I recall reading a yarn github thread about how wiping node_modules for any lockfile changes being the normal behavior, but now I don't know how to find that comment)
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)