installation of draw2d latest version on angular 10 - javascript

how can I install the latest version of draw2d library on angular 10?
I used the command "npm i draw2d" but the version that has been installed is 1.0.38 although the latest version is 6.1 I guess.
enter image description here
thank you.

Actually, you have the latest version of draw2d according to npm :
https://www.npmjs.com/package/draw2d/v/1.0.37
You can also download and add it manually at https://github.com/freegroup/draw2d
To be clear, the version on npm is a package version, not the same that draw2d version of draw2d.org (http://www.draw2d.org/draw2d/).
It creates confusion, I think it's a mistake from the author.

You can test :
npm i draw2d#6.1

Related

npm not installed latest version of package even after using caret(^)

I have added a package(X) as follows in package.json file
package(X): "^5.0.0"
now the latest version of package(X) is 5.0.1. According to my understanding this should install 5.0.1 but it installs version 5.0.0 itself.
Now I have multiple angular projects which are using package(X) and each of them have the same setup. What surprises me is that it works absolutely fine i.e installs version 5.0.1 in some projects and does not in some projects
Here is the info about package(x)
npm library info
It does depend on other packages' dependencies.
If there is a package that requires X to be exactly 5.0.0, then it will install 5.0.0 as it will satisfy ^5.0.0.
If there isn't one, then it will install whichever latest that will satisfy ^5.0.0 which is 5.0.1 in this case.

how i install the previous version react-native-pdf

i using react-native-pdf but in new version it use react-native-blob-util and when i install react-native-blob-util its crash.
i read from stackoverflow and google, that it's better to downgrade the react-native-pdf because, the downgrade version of react-native-pdf why don't use react-native-blob-util.
now i have react-native-pdf version = 6.4.0
now i want to downgrade to react-native-pdf
version = 6.2.0
please someone help me, thankyouu
You can install any npm module by mentioning the version as well. Remove the package from package.json first, then
npm i react-native-pdf#6.2.0
I had faced the same issue last week, so I started using react-native-view-pdf package, its similar and not much code change is required, you can try it.
You can just edit your package.json. Just edit your "react-native-pdf": "6.4.0" to "react-native-pdf": "6.2.0". And after that run npm install or yarn

What happens when there are multiple versions available in organisation npm

I am fairly new to versioning a library, I wanted to get a clarity on my concern and please explain how does npm work.
I am trying to build a library and publish it to my organization npm registry. Now I have an alpha release which is already available in nexus and I did an npm install and the library works fine.
Now I when I create a stable release and make the library available for my organisation to use, when this happens the version tag will be updated to v1.0.0 and when I do an npm install the latest stable version will be available.
Post this, if I create further more alpha builds the version now has an alpha build tag appended to the version. Now when I do an npm install in a fresh project setup which version will I get:
stable version
new alpha version
I am a new to this, if anyone can explain how npm install will work and what version will I get that will be super helpful.
Thanks
What npm i will do for you, depends on what you stated in package.json.
{
"dependencies":{
"foo":"1.0.0", //match version exactly
"baz":">1.0.2", //must be greater than version
"elf":"~1.2.3", //everything from 1.2.3 to <1.3.0
"thr":"^1.2.3", //from 1.2.3 to <2.0.0
}
}
More details here
If you want to know the exact version of the package installed after npm i you could look it up in package-lock.json

How to install latest STABLE version of a Javascript package via a package manager?

How to install latest stable version of a Javascript package via a package manager?
(no alphas, betas, etc.)
I tried NPM and did not find a solution. This question is similar.
I tried Bower and find nothing. Here is a question with no answer here.
Please help. Which package manager should I choose? Maybe there are another options around?
PS
For example: knockout.js, npm givers beta for latest. I don't want beta! I also would like to set the same limitation for dependencies - pull only stable versions.
Installing a package without specifying a version will always install the latest version published to npm, including pre-releases (alpha, beta etc.):
npm install knockout
However, if you specify the version range, even only as a wildcard *, pre-release versions are explicitly excluded:
npm install knockout#*
See the npm docs for more info. Also, you can test this in npm's semver calculator.

How do I downgrade / install a specific version of jspm?

I upgraded to --latest but want to downgrade to a specific version due to compatibility issues.
Just specify the version number like so.
npm install jspm#1.0.0

Categories

Resources