Like npm for node, we use package.json to solve dependencies.
I tried raco pkg, it seems to be just a way to dev/pub packages instead of solving external dependencies.
As I described above, info.rkt in Racket acts like package.json in JavaScript, and raco pkg install will read the dependencies specified in info.rkt and recursively install these dependencies.
For instance, here's the Pollen project's info.rkt. You can see that it specifies txexpr which is another package as a dependency. Therefore, when you raco pkg install pollen, it will ask you if you want to install txexpr too. You can also invoke raco pkg install --auto pollen which will install dependencies automatically without asking any question.
Note that these packages are registered with https://pkg.racket-lang.org/ which is an equivalent of https://www.npmjs.com/ in JS.
You can read the documentation of info.rkt regarding package dependencies here.
Related
apt is a good choice for installation, but apt requires root permissions.
Therefore I tried to install texlive using install-tl.
However, some perl utils and font utils dependencies are not installed.
Is there any convenient way to install all dependencies texlive requires?
(in this question I talk RPM but the same issue concerns DEB and IPK I suppose)
How can I find which recipe provides a given RPM package? Is there a tool for that?
With grep and looking at the source code of the recipes, I can find out, but it is tedious.
Moreover the package name in yocto is not always the same as the RPM package name. Is there a tool for showing the relationship?
Examples:
which recipe provides the RPM package libgmp10? (and what is the PACKAGE name in yocto)
same question for the RPM package libmount1?
If those packages are already built, you can use the oe-pkgdata-util tool to find which recipe that provides a certain package. It's agnostic to which package format you're using, so it works for rpm/deb/ipk.
In the example below I want to find out which recipe that provides the package called libmount1, and the command shows that the recipe name is util-linux
$ oe-pkgdata-util lookup-recipe libmount1
util-linux
And to find the recipe-space package name:
$ oe-pkgdata-util lookup-pkg -r libmount1
util-linux-libmount
When I install a package using raco
raco pkg install pkg-name
I get a prompt asking me to confirm if I want to install the dependencies. I hit y and after a while I get a prompt confirming if I want to install the dependencies of the dependencies.
Is there a command line option which can disable all prompting / give only one prompt?
To disable all promptings and install dependencies without asking:
raco pkg install --auto pkg-name
In the documentation for raco pkg install, --auto means:
Looks for dependencies (when uninstalled) or updates (when version requirements are unmet) via the configured package catalogs
and
does not ask for permission to install or update
I know that running yarn add package#1.2.3 would install package v1.2.3.
I recently encountered this syntax: yarn add package#npm. What does #npm do? Is it a special sign for yarn or is it specific to that package (material-ui)?
I encountered #npm as a solution to include two versions of material-ui by aliasing the next version: yarn add material-ui-next#npm:material-ui#next
No real surprises, it is a directive to install a specific package from npm.
yarn add {package1} installs the specified package from the npm registry by default.
yarn add {package1}#npm:{package2} installs package2 from the npm registry and assigns package1 as its alias.
It makes no difference if a package named package1 exists in the npm registry, it will only download the package you've specified with the #npm directive.
From your question, it seems like you've already got a handle on this one.
I used to install plugins in my ionic 1 project with bower. The new trend, especially with ionic 2, is to install packages with npm. Some core packages, such as ionic.cloud are not provided at all anymore with bower, even for ionic 1.x.
So I need to migrate some packages to npm. What is the recommended way to do so ?
My problem:
"npm install" seems to install packages in the "my_project/node_modules" folder, unlike bower which installs packages directly in my_project/www/lib/
As explained for instance in the installation guide of ionic.cloud this requires an additional step to copy the newly installed npm package in the lib folder with the command:
cp node_modules/#ionic/cloud/dist/bundle/ionic.cloud.min.js www/lib
However, when I update the package and run "npm update", this will update the node_modules folder, but not the lib folder. This is a problem as only the files from my lib folder are included in my index.html.
Running the cp-command after each npm update does not seem such an elegant solution. What is the recommended way to deal with this?
I think you can reverse this make the .bowerrc file create your packages inside the node_modules folder and use this path as default. Otherwise the node_modules is mandatory there is no way around creating it.
Even you can npm i --prefix ./bower_components/ <package> you still need to cp to folders up from bower_components folder