Angular version (13) - npm

I have a problem when running
the command
npm install -g #angular/cli#13.0.0
I need angular (cli) and angular to be in version 13 but when running the command, angular (cli) is in 13 and angular in 15 which gives me an error with project dependencies
enter image description here
when I run npm
enter image description here

You have to install the "xlsx" library. To install, run the below command
npm install --force

Related

error installing cypress on windows 64 with npm

I'm seeing an error when attempting to install the latest cypress on my Windows 10 machine. I was using cypress 8.7 just fine. I deleted node_modules and package-lock.json and removed "cypress": "^8.7.0", from package.json.
Now installing cypress (9.1) I see this error:
npm install --save-dev cypress
npm ERR! Error: Cannot find module 'har-validator'
I see the same error when trying to use the old version too
npm install --save-dev cypress#8.7.0
System info from powershell:
node -v
> v16.8.0
npm -v
> 7.21.0
UPDATE:
My friend is able to install with dependency 8.7.0 in package.json, on OSX with nodejs 14.16.0.
This works today (2021-11-26) for me
npm install --save-dev cypress#8.7.0
There is a Bug in #cypress/request.
Take a look at https://github.com/cypress-io/request/pull/15
EDIT: There is a PR from one of the devs. https://github.com/cypress-io/request/pull/16
Looks like Cypress issue with latest versions. we have this problem for v8.7.0 today. "npm install har-validator" manually installed the missing har-validator module, that helped.

You are running version v6.10.3 of Node.js, which is not supported by Angular CLI v6

I am having trouble with this error, my project need run angular/cli version 1.7.4 and Nodejs 6.10.3 .But the past I used angular cli version 6 and now I want to downgrade to angular cli 1.7.4 but I don't know how to downgrade angular cli version 6 at my global. I try to use npm uninstall -g #angular/cli and then I install the version I want by command npm install -g #angular/cli#1.7.4 but when I check ng -v it's still have a error in picture
P/S: I were updated my npm to latest version to make sure can remove angular cli version but still don't work
Keep your global package running at the highest version. If a project needs CLI 1.x, use the npm run commands instead.
Any npm commands run use the project's CLI, not your global version.

How to install particular Angular version using node package manager

How can install a specific version of Angular 4 using node package manager?
I ran npm view #angular/cli versions command , the available version displayed are
I could not see version 4 and 5 in the list
how could i download the version 4 or 5
If you want to install this specific version of the angular cli you have to use this command:
npm install -g #angular/cli#1.4.9
Perhaps you have an other version currently installed on your system you should read this also.
source: Angular downgrade from version 5 to 4
To install a particular version you need to run the following command line
npm install -g #angular/cli#<version>
Example:
npm install -g #angular/cli#1.0.0
You can see the available versions with the following command:
npm view #angular/cli

electron install error : Generated checksum for "electron-v2.0.2-win32-x64.zip" did not match expected checksum

I want to install latest electron version in my existing angular application.So I followed npm command to install it.
Command : npm i electron#latest
Expected Behavior
Electron should installed successfully.
Actual Behavior
So, Whenever I tried to install electron, after downloading zip file and SAMSUN.txt file , it is throwing below error....
Error: Generated checksum for "electron-v2.0.2-win32-x64.zip" did not match expected checksum.
at ChecksumMismatchError.ErrorWithFilename (E:\CityLawElectron\node_modules\electron-download\node_modules\sumchecker\build.js:41:124)
at new ChecksumMismatchError (E:\CityLawElectron\node_modules\electron-download\node_modules\sumchecker\build.js:56:133)
at Hash. (E:\CityLawElectron\node_modules\electron-download\node_modules\sumchecker\build.js:203:22)
at emitNone (events.js:106:13)
at Hash.emit (events.js:208:7)
at emitReadable_ (_stream_readable.js:513:10)
at emitReadable (_stream_readable.js:507:7)
at addChunk (_stream_readable.js:274:7)
at readableAddChunk (_stream_readable.js:250:11)
at Hash.Readable.push (_stream_readable.js:208:10)
Please note that I have tried to clear my npm cache using npm cache clean --force command and tried to install. but it didn't work.
I also tried to install electron globally using npm i -g electron#latest, but that approach also didn't work.
Please provide solution as soon as possible because I m really stuck at this problem.
Electron Version: 2.0.2
Operating System : windows
node version : 8.11.2
npm version : 6.1.0
Last known working Electron version:
We can solve this issue by using following steps (OS - Windows 10)
Delete "SHASUMS256.txt-x.x.xx" file from "C:\Users{{UserName}}.electron".
Delete Cache folder from "C:\Users{{UserName}}\AppData\Local\electron".
Delete electron from node_modules folder.
Then install electron globally and locally by using following commands -
npm init -y //Note: The -y flag provides default options automatically
npm install electron -g //install electron globally
npm install electron --save-dev --save-exact //install electron as devdependencies
If you are using typescript then install it as global using below command-
npm install -g typescript
Above steps may help you.

Cannot uninstall ionic using npm on Mac

I am trying to switch to ionic2. Installing on top of my previous installation of ionic 1 appears to succeed (based on the output) but ionic1 remains as shown by ionic info. Here were the steps. Any help would be appreciated.
Successfully Installed ionic2#beta using sudo npm install -g ionic#beta
ionic -v shows version 1.7.14
Uninstalled using npm uninstall -g ionic
Successfully (based on printout) uninstalled ionic 2
ionic -v shows version 1.7.14 (WTF)
Tried 'npm uninstall -g ionic' again
Received command prompt immediately, no other outputs (no affect)
ionic -v shows version 1.7.14
With some investigation I found out what was going wrong. At some point earlier I had installed ionic version 1 which got loaded by npm in /usr/local/lib as part of the sub-directory node_modules. Later on when I installed version 2 globally with sudo it installed it in my home directory ~/.npm-global/lib/node_modules/ionic/bin. The installed program was a node script called ionic. The bash alias was still pointing to the version 1 code. I don't know why npm changed the directory. To fix the problem, I did the following:
Deleted the folder /usr/local/bin/node_modules/ionic
Removed the symbolic link to the alias named ionic
Re-installed the ionic#beta globally using sudo. This created the node script ionic in ~/.npm-global/lib/node_modules/ionic/bin.
Tested it using the full path to the node script ionic
In the process of creating a symbolic link named ionic so I can access the command from anywhere in my home directory.
Have to load cordova 4.3 and
I should have found this earlier but I am getting rusty in my command line skills. It turns out that ionic-cli is works for both v1 and v2.
You are using wrong command ionic2#beta to install ionic 2. Use
$ npm install -g ionic#beta
use this
sudo npm uninstall -g ionic
This works for me on ubuntu 16,
to remove cordova, ionic:
sudo npm uninstall -g cordova
sudo npm uninstall -g ionic
and for npm:
sudo npm uninstall npm -g
hope it will work
For mac user delete this folders.
/usr/local/lib/node_modules/ionic
/usr/local/share/npm/lib/node_modules/ionic
As you could install it with
npm install -g ionic
you should uninstall it with
npm uninstall -g ionic