Getting an error when tried to install bower packages with jspm - github

When I try to install a bower package like devextreme with the following command jspm install bower:devextreme, I get an error
Registry bower not found
Should I update any jspm settings or install any npm package to install bower packages? Both the npm and github works fine with jspm.

This video helped me. After installing the jspm-bower-endpoint package, run the command jspm registry create bower jspm-bower-endpoint.

Related

Upgrade Ionic 5.0 to 5.3 Commands

What is the proper set of npm commands to update Ionic from v5.0 to v5.3.1 (latest release), as well as, bump the version of Capacitor, Ionic Native, and the dev dependencies appropriately?
I can't find an update guide with commands in the Ionic docs unlike in Angular where you would follow the update steps on https://update.angular.io. They don't seem to indicate whether the CLI version should match the Ionic version, or whether the version of Capacitor for a specific version of Ionic or the CLI is required, or if none of that matters.
Would I run these commands:
// dependencies
npm install #capacitor/android#latest
npm install #capacitor/core#latest
npm install #capacitor/ios#latest
npm install #ionic/core#latest
npm install #ionic-native/core#latest
npm install #ionic-native/in-app-browser#latest
npm install #ionic-native/splash-screen#latest
npm install #ionic-native/status-bar#latest
npm install #ionic/angular#latest
npm install #ionic/storage#latest
// dev dependencies
npm install #capacitor/cli#latest
npm install #ionic/angular-toolkit#latest
npm install #ionic/lab#latest
or equivalently just run npm upgrade <LIST_OF_ABOVE_PKGS>? and are there dependencies between Ionic, Ionic CLI, Capacitor, and Ionic Native?
run at cmd in "npm install -g ionic#5.3.2"

how to install sass specific version in ubuntu?

I want to install a sass old version on my laptop. I tried Sudo apt install ruby-sass#1.2 and npm install --save-dev node-sass#1.2 command lines but none of them worked.
anyone please tell to install specific versions of sass?
try installing stable version of node-sass
npm uninstall node-sass
npm install node-sass#4.14.1

error 404 Not Found: #ionic/cli-utils#1.13.1 during npm install

After installing cordova using
npm install cordova -g
I tried to install ionic, using
npm install ionic -g
but got
404 Not Found: #ionic/cli-utils#1.13.1
combining both statements as
npm install cordova ionic -g
generates the same error.
What could be the problem here? I use Artifactory as node modules proxy by the way, which generally works well in my environment.

Install specific branch from github using Npm

I would like to install bootstrap-loader from github in my project using npm
Currently they are maintaining two version of this project which are comaptible with webpack version 1 and 2.
I would like to install version 1. What npm command I should use to install this?
I tried using below one but it is not working.
npm install git://github.com/shakacode/bootstrap-loader.git[#v1] --Save
There are extra square brackets in the command you tried.
To install the latest version from the brach-name branch, you can use:
npm install "https://github.com/shakacode/bootstrap-loader.git#branch-name" --save
npm: npm install username/repo#branchName --save
yarn: yarn add username/repo#branchName
e.g. npm i betimer/rtc-attach#master --save (my username is betimer)
// this will appear in your package.json:
"rtc-attach": "github:betimer/rtc-attach#master"
One thing I also want to mention: it's not a good idea to check in the package.json for the build server auto pull the change. Instead, put the npm i (first command) into the build command, and let server just install and replace the package.
One more note, if the package.json private is set to true, may impact sometimes.
you can give git pattern as version, yarn and npm are clever enough to resolve from a git repo.
yarn add any-package#user-name/repo-name#branch-name
or for npm
npm install --save any-package#user-name/repo-name#branch-name
Another approach would be to add the following line to package.json dependencies:
"package-name": "user/repo#branch"
For example:
"dependencies": {
... other dependencies ...
"react-native": "facebook/react-native#master"
}
And then do npm install or yarn install
I'm using SSH to authenticate my GitHub account and have a couple dependencies in my project installed as follows:
"dependencies": {
"<dependency name>": "git+ssh://git#github.com/<github username>/<repository name>.git#<release version | branch>"
}
Had to put the url in quotes for it work
npm install "https://github.com/shakacode/bootstrap-loader.git#v1" --save
Tried suggested answers, but got it working only with this prefix approach:
npm i github:user/repo.git#version --save -D
Only solution working for me:
$ npm i https://github.com/{USER}/{REPO}/tarball/{BRANCH} --save
as explained here.
Both below versions work for me as of beginning of 2023:
npm i "github:shakacode#bootstrap-loader"
npm i "https://github.com/shakacode/tree/bootstrap-loader/"
The Doc of the npm defines that only tag/version can be specified after repo_url.
Here is the Doc: https://docs.npmjs.com/cli/install

How to verify facebook jest is installed successfully

I followed the instructions to install Facebook jest on https://facebook.github.io/jest/docs/getting-started.html#content :
npm install --save-dev jest-cli
After the install command I typed jest in the terminal, and press enter but It popped:
bash: jest: command not found.
But when I run the getting started sample by using npm test in the terminal, it worked well.
So, how can I verify that Facebook jest is installed successfully?
Ways to install a package in npm
In node.js you have two ways to install a package: globally or locally.
The sintax is the following:
// globally
npm install -g [package_name]
// locally
npm install --save-dev [package_name]
So, now what it happens is that you run the local one which downloads the package in node_modules under your project folder.
To check you installed jest properly so you can check on your node_modules if there is a jest folder.
How to check if jest is installed
In addition to that npm is creating a shortcut in you local node_modules under the directory .bin son in there you should find a link to jest.
You can test that like that:
cd your_project_folder
./node_modules/.bin/jest
Why npm test works?
The reason why npm test works is because when you run it npm is going to look for the commands globally and locally.