I have about 800 json files with a total of 1 GB in composer\Local\repo\https---repo.packagist.org
What's the purpose of those files? What might happen if I just remove them?
composer\Local\files\ contains 80 MB only.
Simply clear the cache with composer clear-cache.
Related
Using yarn 2's new plug n play (pnp) creates a long .pnp.js file. I get a bunch of merge conflicts while pulling, and these are not autofixed (unlike yarn.lock).
How are these conflicts solved? I'd rather not go them through manually as it's not clear what change to accept.
Example conflict
["virtual:844e49f9c8ad85b5809b347eb507fe8bfdc2d527102f53e0b4f78076a2ad5ea2556763170701137a2cafdc51d5a36d82e448010e65742a300748e0bc70028101#npm:11.2.7", {
"packageLocation": "./.yarn/$$virtual/#testing-library-react-virtual-2e67fd5293/0/cache/#testing-library-react-npm-11.2.7-3a0469c756-389c9f3e83.zip/node_modules/#testing-library/react/",
"packageDependencies": [
["#testing-library/react", "virtual:844e49f9c8ad85b5809b347eb507fe8bfdc2d527102f53e0b4f78076a2ad5ea2556763170701137a2cafdc51d5a36d82e448010e65742a300748e0bc70028101#npm:11.2.7"],
["#babel/runtime", "npm:7.13.10"],
<<<<<<< HEAD
["#testing-library/dom", "npm:7.30.4"],
["#types/react", "npm:17.0.3"],
["#types/react-dom", "npm:17.0.3"],
=======
["#testing-library/dom", "npm:7.31.0"],
["#types/react", "npm:17.0.8"],
["#types/react-dom", "npm:17.0.5"],
>>>>>>> d2bb5d9e537f9647e9757656de230e56282e0b15
["react", "npm:17.0.2"],
I would assume you can delete this file containing merge conflicts.
Next, you run yarn install which will generate this file again.
Or just run yarn install which will overwrite the the .pnp.cjs file and fix the merge conflicts (if any) in the yarn.lock file for you.
From the docs:
The generated .pnp.cjs file can be committed to your repository
as part of the Zero-Installs effort, removing the need to run yarn install in the first place.
As you can read, this file can - not must - be committed. However, if you commit it, you can use all your dependencies immediately after cloning the repo, switching branches, ... without need to run yarn install every time.
Note that the same does not count for yarn.lock file which you should never delete.
I get the following error when I tried uploading the Akeeba Backup extension on my localhost: "There was an error uploading this file to the server."
I tried uploading JCE Editor and it worked fine. I understand this error appears because I cannot upload extensions bigger than X MB (JCE is 1,5MB and Akeeba is 2,25MB). So my guess is I cannot upload extensions bigger than 2MB.
Researching I came across two solutions, neither worked for me.
First solution:
In the file ini.php find the following line upload_max_filesize = xM and replace "x" with a value of 10 (for example). I could not find the above mentioned line in the ini.php file.
Second solution:
In your .htaccess add the following:
php_value max_upload_size 10M
added the code, nothing happened.
I am using Joomla 3.2
Rather than trying to manually find the correct line to edit, in your code editor, use Ctrl + F which will open up the "find" box. Copy and paste upload_max_filesize and click "find". This will take you to the exact line where it is located. Once changed, save the file and restart Apache/All services on your localhost.
My editor produces workspace files and backup folders which are of no interest to users of the software I write. In order to avoid having to list my editor-specific ignores in each project, I'm trying to tell npm to ignore them at the user or global level.
Unfortunately, I'm having no luck doing so. Running npm pack inside my project folder, even if I clear the npm cache first, includes both the workspace file and and two megabytes of backup files. (For a project with only ten kilobytes of code!) I've tried the ignore config setting, a per-user .npmignore, and a global npmignore, all to no effect.
Here's my output from npm config ls -l, snipped to relevant sections:
; userconfig C:\Users\benblank\.npmrc
ignore = "__history *.epp"
; builtin config undefined
prefix = "C:\\Users\\benblank\\AppData\\Roaming\\npm"
; default values
globalignorefile = "C:\\Users\\benblank\\AppData\\Roaming\\npm\\etc\\npmignore"
userignorefile = "C:\\Users\\benblank\\.npmignore"
And the (identical) contents of C:\Users\benblank\.npmignore and C:\Users\benblank\AppData\Roaming\npm\etc\npmignore:
__history
*.epp
What am I doing wrong? I'm running Windows 7, node#0.8.9, and npm#1.1.61.
npm has some major outstanding issues related to npmignore files.
Thankfully there is an even better alternative! It is the package.json files property.
Here is an example from my delivr project.
"files": [
"lib",
"index.js"
]
Why is it better?
The internal machinery makes this mechanism more reliable.
It is a whitelist instead of a blacklist. Typically, assuming you use a lib folder (or similar), there are less files/directories you want included vs those you want excluded, so it is more succinct.
It is DRY. If a .npmignore file exists, npm will not consult .gitignore for ignore patterns, which often needs overlapping and repetitive info. This problem does not exist with a whitelist.
One less file in the repo. package.json is already a manifest that defines your package and it makes a ton of sense for this configuration to live there.
I am using windows pc and my friend exported a mongodb collection form a mac into a .js(7 MB) file. When I try to import that file I get The connection was reset " The connection to the server was reset while the page was loading. "
It sounds like your apache + php is the culprit. Perhaps the timeout is too short or the upload limit is too small.
Either way, I'd just use mongoimport directly. The full documentation is at http://www.mongodb.org/display/DOCS/Import+Export+Tools
I had an issue uploading a 3.7 M file with Rockmongo. It turns out my php.ini had the following (default) setting:
upload_max_filesize = 2M
Changing that to
upload_max_filesize = 10M
and restarting apache/php fixed it.
I'm troubleshooting a magento installation in which all requests to magento are super slow. PHP files run no problem, it's specifically an issue with Magento.
The original setup was using APC as a cache, but I've tried with it on and off. I ran strace to get an idea of what was going on in magento and found a bunch of lines like this-
stat("/var/www/vhosts/mysite.com/httpdocs/var/cache/mage--7/mage---internal-metadatas---MY_PREFIX_MY_PREFIX_CONFIG_GLOBAL",0x7fff7783e3b0) = -1 ENOENT (No such file or directory)
lstat("/var/www/vhosts/mysite.com/httpdocs/var/cache/mage--7/mage---internal-metadatas---MY_PREFIX_MY_PREFIX_CONFIG_GLOBAL",
0x7fff7783c140) = -1 ENOENT (No such file or directory)
Notice the duplicate "MY_PREFIX". For some reason, the trace is showing that Magento is looking for files with duplicated MY_PREFIX. On top of that, I'm not entirely sure why Magento is even searching the file system as APC is enabled and I can see the entry for this cache item being hit.
Here's my cache config:
<cache>
<backend>apc</backend>
<prefix>MY_PREFIX_</prefix>
</cache>
Anyone have any suggestions?