Angular Installation on Windows PC failed - npm

During my installation of Angular on my PC, It gave me the error below after running this command ng new my-angular-project
This is the error message below:
| Installing packages (npm)...npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ERR_SOCKET_TIMEOUT: request to https://registry.npmjs.org/depd failed, reason: Socket timeout
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! https://github.com/npm/cli/issues
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Idris Samir\AppData\Local\npm-cache_logs\2021-04-13T19_49_12_527Z-debug.log
× Package install failed, see above.
The Schematic workflow failed. See above.

Related

Has anyone successfully installed Nodejs Soap on Windows 10?

Unable to install Node.js soap for Windows 10.
I tried to install Node.js soap by:
npm install soap
But it gives the following Error
error code 1
error git dep preparation failed
error command C:\Program Files\nodejs\node.exe C:\Users\mhiqbal\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js install --force --cache=C:\Users\mhiqbal\AppData\Local\npm-cache --prefer-offline=false --prefer-online=false --offline=false --no-progress --no-save --no-audit
error npm WARN using --force Recommended protections disabled.
error npm ERR! code ENOTFOUND
error npm ERR! syscall getaddrinfo
error npm ERR! errno ENOTFOUND
error npm ERR! network request to https://registry.kase.se/yTdajDWYTVuNFFmbAjvaYeFZtOyPVJQc/typescript/-/typescript-2.9.2.tgz failed, reason: getaddrinfo ENOTFOUND registry.kase.se
error npm ERR! network This is a problem related to network connectivity.
error npm ERR! network In most cases you are behind a proxy or have bad network settings.
error npm ERR! network
error npm ERR! network If you are behind a proxy, please make sure that the
error npm ERR! network 'proxy' config is set properly. See: 'npm help config'
error
error npm ERR! A complete log of this run can be found in:
Moreover the link https://registry.kase.se/yTdajDWYTVuNFFmbAjvaYeFZtOyPVJQc/typescript/-/typescript-2.9.2.tgz is not accessible directly.
Has anyone come accross the same problem?
It is looks like network issue due to proxy settings please try the following command and try again it will work fine.
npm config delete proxy
npm config delete http-proxy
npm config delete https-proxy
and then try this
npm i soap

npm ERR! code ERR_INVALID_ARG_TYPE Error when npm install

I cloned my project into ubuntu server for deployment, but when i try to install dependencies and I encountered Maximum Call stack size exceeded error. Then following answers on stackoverflow I deleted node modules and package.json. But now when I do npm install I encounter the below error.
npm ERR! code ERR_INVALID_ARG_TYPE
npm ERR! errno ERR_INVALID_ARG_TYPE
npm ERR! request to https://registry.npmjs.org/#material-ui%2fcore failed, reason: The "msecs" argument must be of type number. Received type string ('600001')
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ute/.npm/_logs/2021-07-20T08_00_38_282Z-debug.log
also getting the same type of error when I do npm update -g
npm ERR! request to https://registry.npmjs.org/npm failed,
reason: The "msecs" argument must be of type number. Received type string ('600001')
You should not remove package.json file because of this file contain the necessary details of dependencies as modules and other data.
You can use npm init in your specific directory to create a package.json file and then install your modules with this command npm i -S [your_dependency]

nextjs Build failed because of webpack errors on CentOS 7

I want to deploy a nextjs application on a centos server. But when i try to build using npm run build it gives me the following error
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist#latest --update-db
info - Creating an optimized production build
Failed to compile.
ModuleNotFoundError: Module not found: Error: Can't resolve '../context/auth/AuthState' in '/var/www/html/projectname/pages'
> Build error occurred
Error: > Build failed because of webpack errors
at build (/var/www/html/projectname/node_modules/next/dist/build/index.js:15:918)
at runMicrotasks (<anonymous>)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! client-ubii-app#0.1.0 build: `next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the client-ubii-app#0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-03-31T21_10_01_066Z-debug.log
But when i do the same on my local machine runnig windows 10 it works fine
If you has been change in name of file or folder only case sensitive character, this problem may be happen if your remote branch is not updated. Please, make sure if remote branch has the old name of file or folder. If true, fix it because the CentOs is Linux, so file and folder with same words in lower case is different with upper case.

Visual Studio Code Extension - npm installation failed becuase of package dependency?

I'm trying to write a small extention for Visual Studio Code but it fails right at the beginning.
I installed yo, as intended
npm install -g yo generator-code
however, now when I'm trying to start everything up, I get errors.
I created a project using yo code and following the generator. I tried Extension Typescript and Javascript, both failed.
the settings used:
initialize a git repository: yes
package manager: npm
Running npm install for you to install the required
dependencies. If this fails, try running the command yourself.
The auto installation failed, running npm install however caused the same error:
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EPROTO: request to https://registry.npmjs.org/mocha failed, reason: write EPROTO 10300:error:14094417:SSL routines:ssl3_read_bytes:sslv3 alert illegal parameter:c:\\ws\\deps\\openssl\\openssl\\ssl\\record\\rec_layer_s3.c:1407:SSL alert number 47\n
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code ETARGET
npm ERR! notarget No matching version found for #types/vscode#^1.43.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
npm ERR! notarget
npm ERR! notarget It was specified as a dependency of 'smartfilesnfolders'
npm ERR! notarget
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lechn\AppData\Roaming\npm-cache\_logs\2020-03-10T12_50_32_409Z-debug.log
full log: https://gist.github.com/lechnerio/e1356b2edb48cbdedf40fd1570267bb7
thankful for any hints and tips. npm and vscode are up to date.
I've got the same error a moment ago. I solved it by changing #types/vscode version to ^1.42.0 in package.json.

whenever I try to install npm it throws the following error,

npm install #angular/cli
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! request to https://registry.npmjs.org/#angular%2fcli failed, reason: unable to get local issuer certificate
thank you
There are some network issue you can use open network for this or you firewall blocked it.