npm install --global windows-build-tools problem - npm

npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated windows-build-tools#4.0.0: Node.js now includes build tools for Windows. You probably no longer need this tool. See https://github.com/felixrieseberg/windows-build-tools for details.
npm ERR! code 1
npm ERR! path C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./dist/index.js
Downloading python-2.7.14.amd64.msi
npm ERR! [============================================>] 100.0% of 20.2 MB (3.51 MB/s)
npm ERR! Downloaded python-2.7.14.amd64.msi. Saved to C:\Users\ABC\.windows-build-tools\python-2.7.14.amd64.msi.
Downloading BuildTools_Full.exe
npm ERR! [============================================>] 100.0% of 3.29 MB (3.29 MB/s)
npm ERR! Downloaded BuildTools_Full.exe. Saved to C:\Users\ABC\.windows-build-tools\BuildTools_Full.exe.
npm ERR!
npm ERR! Starting installation...
npm ERR! Downloading installers failed. Error: TypeError: 'process.env' only accepts a configurable, writable, and enumerable data descriptor
npm ERR! at Function.defineProperty (<anonymous>)
npm ERR! at Object.removePath (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\dist\utils\remove-path.js:11:12)
npm ERR! at Object.install (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\dist\install\index.js:29:19)
npm ERR! at C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\dist\start.js:17:19
npm ERR! at Object.download (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\dist\download.js:35:5)
npm ERR! at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! at async Object.aquireInstallers (C:\Users\ABC\AppData\Roaming\npm\node_modules\windows-build-tools\dist\aquire-installers.js:32:13) {
npm ERR! code: 'ERR_INVALID_OBJECT_DEFINE_PROPERTY'
npm ERR! }
npm ERR! windows-build-tools will now exit.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ABC\AppData\Local\npm-cache\_logs\2023-01-18T06_00_13_950Z-debug-0.log
how to solve it please

Related

npm audit fix throwing errors

npm audit fix --force
is not working for me. I'm getting the following error. I have updated npm to the latest but the result is same.
npm WARN audit Updating electron to 6.1.12, which is a SemVer major change.
npm WARN deprecated har-validator#5.1.5: this library is no longer supported
npm WARN deprecated uuid#3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request#2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /Users/a1/Desktop/Coding/pinpadtrial/node_modules/electron
npm ERR! command failed
npm ERR! command sh -c /var/folders/d_/4kw46v7n4fj05lh26rt915400000gn/T/postinstall-1656028299602.sh
Downloading tmp-17971-0-electron-v6.1.12-darwin-arm64.zip
npm ERR! Error: GET https://github.com/electron/electron/releases/download/v6.1.12/electron-v6.1.12-darwin-arm64.zip returned 404
npm ERR! /Users/a1/Desktop/Coding/pinpadtrial/node_modules/electron/install.js:53
npm ERR! throw err
npm ERR! ^
npm ERR!
npm ERR! Error: Failed to find Electron v6.1.12 for darwin-arm64 at https://github.com/electron/electron/releases/download/v6.1.12/electron-v6.1.12-darwin-arm64.zip
npm ERR! at Request.<anonymous> (/Users/a1/Desktop/Coding/pinpadtrial/node_modules/nugget/index.js:169:61)
npm ERR! at Request.emit (node:events:394:28)
npm ERR! at Request.onRequestResponse (/Users/a1/Desktop/Coding/pinpadtrial/node_modules/request/request.js:1059:10)
npm ERR! at ClientRequest.emit (node:events:394:28)
npm ERR! at HTTPParser.parserOnIncomingClient [as onIncoming] (node:_http_client:621:27)
npm ERR! at HTTPParser.parserOnHeadersComplete (node:_http_common:128:17)
npm ERR! at TLSSocket.socketOnData (node:_http_client:487:22)
npm ERR! at TLSSocket.emit (node:events:394:28)
npm ERR! at addChunk (node:internal/streams/readable:312:12)
npm ERR! at readableAddChunk (node:internal/streams/readable:287:9)
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/a1/.npm/_logs/2022-06-23T23_51_37_371Z-debug-0.log```

unable to run npm start or npm install in Ubuntu 18.04

I'm new to front-end development and nodejs / react so please bear with me if this is a silly question.
I was trying to learn by using this open project: https://github.com/ilhammeidi/boss-lite
In the readme, it states pretty clearly on how to deploy this react project:
Clone this project
Install module dependencies by run this script in terminal npm install
After finish downloading, then run the app. npm run dev
Navigate to http://localhost:8080
However I cannot get even the first npm install step right on my Ubuntu 18.04:
john#home:~/learnFE/code/boss-lite$ npm install
npm WARN deprecated material-ui-pickers#1.0.1: You can now upgrade to #material-ui/pickers. Documentation for v2 can be found at https://material-ui-pickers-v2.dmtr-kovalenko.now.sh/
npm WARN deprecated axios#0.17.1: Critical security vulnerability fixed in v0.21.1. For more information, see https://github.com/axios/axios/pull/3410
npm WARN deprecated react-router-redux#5.0.0-alpha.9: This project is no longer maintained.
npm ERR! Linux 5.4.0-67-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code EMISSINGARG
npm ERR! typeerror Error: Missing required argument #1
npm ERR! typeerror at andLogAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:31:3)
npm ERR! typeerror at fetchPackageMetadata (/usr/share/npm/lib/fetch-package-metadata.js:51:22)
npm ERR! typeerror at resolveWithNewModule (/usr/share/npm/lib/install/deps.js:456:12)
npm ERR! typeerror at /usr/share/npm/lib/install/deps.js:457:7
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror at /usr/share/npm/lib/fetch-package-metadata.js:37:12
npm ERR! typeerror at addRequestedAndFinish (/usr/share/npm/lib/fetch-package-metadata.js:82:5)
npm ERR! typeerror at returnAndAddMetadata (/usr/share/npm/lib/fetch-package-metadata.js:117:7)
npm ERR! typeerror at pickVersionFromRegistryDocument (/usr/share/npm/lib/fetch-package-metadata.js:134:20)
npm ERR! typeerror at /usr/share/npm/node_modules/iferr/index.js:13:50
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <http://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/john/learnFE/code/boss-lite/npm-debug.log
john#home:~/learnFE/code/boss-lite$
I searched the error and found this post in which this is a widely accepted solution: run sudo npm install -g npm#latest, however:
john#home:~/learnFE/code/boss-lite$ sudo npm install -g npm#latest
▌ ╢░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
WARN engine npm#7.9.0: wanted: {"node":">=10"} (current: {"node":"8.10.0","npm":"3.5.2"})
/usr/local/lib
└── (empty)
npm ERR! Linux 5.4.0-67-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "npm#latest"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib/node_modules/.staging/#npmcli/ci-detect-c7bf9552
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/#npmcli/ci-detect-c7bf9552' -> '/usr/local/lib/node_modules/npm/node_modules/#npmcli/ci-detect'
npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/#npmcli/ci-detect-c7bf9552' -> '/usr/local/lib/node_modules/npm/node_modules/#npmcli/ci-detect'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! Please include the following file with any support request:
npm ERR! /home/john/learnFE/code/boss-lite/npm-debug.log
npm ERR! code 1
john#home:~/learnFE/code/boss-lite$
It says This is most likely not a problem with npm itself. How to proceed then?
The linux kernel version also appears:
npm ERR! Linux 5.4.0-67-generic
I'm clueless right now and it is so frustrating to be failing at the simple and basic step...
Maybe it is because the github project itself is flawed? I guess not.
Probably this is some really basic stuff. Any help?
These errors were simply due to the packages being obsolete for your OS.
Just update them by running,
npm update --force
This will install the latest versions of these packages. This will take a while depending on your internet connection.
Then run npm start and it works.

travis-ci fails on typings install

I'm trying to get travis-ci going on my angular2 project, which uses npm to install typings, but travis-ci fails on typings install.
error
npm ERR! Linux 3.13.0-40-generic
npm ERR! argv "/home/travis/build/borysn/spring-boot-angular2/src/main/web/node/node-v6.2.0-linux-x64/bin/node" "/home/travis/build/borysn/spring-boot-angular2/src/main/web/node_modules/npm/bin/npm-cli.js" "install"
npm ERR! node v6.2.0
npm ERR! npm v3.9.2
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! spring-boot-angular2#0.0.1-SNAPSHOT postinstall: `typings install`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the spring-boot-angular2#0.0.1-SNAPSHOT postinstall script 'typings install'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the spring-boot-angular2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! typings install
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs spring-boot-angular2
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls spring-boot-angular2
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/travis/build/borysn/spring-boot-angular2/src/main/web/npm-debug.log
:npmInstall FAILED
There were changes in typings 1.0 that I missed, make sure to read through updating from 0.x to 1.0

Stuck with Npm? npm install errors

I am having a strange problem with npm in my ubuntu 14.04. I have a package.json file in my project directory. when i try to run
npm install
it fails. It logs something like
is related to insufficient space on your system.
But i have checked that there is enough available space in my directory.
Here is the log
npm ERR! tar.unpack untar error /home/rafi/.npm/core-js/1.2.6/package.tgz
npm ERR! tar.unpack untar error /home/rafi/.npm/caniuse-db/1.0.30000384/package.tgz
npm ERR! Linux 3.16.0-49-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! path /home/rafi/Desktop/dsf.angular/node_modules/babel-plugin-transform-export-extensions/node_modules/babel-runtime/node_modules/core-js/modules/library/es6.object.to-string.js
npm ERR! code ENOSPC
npm ERR! errno -28
npm ERR! nospc ENOSPC, open '/home/rafi/Desktop/dsf.angular/node_modules/babel-plugin-transform-export-extensions/node_modules/babel-runtime/node_modules/core-js/modules/library/es6.object.to-string.js'
npm ERR! nospc This is most likely not a problem with npm itself
npm ERR! nospc and is related to insufficient space on your system.
npm ERR! Please include the following file with any support request:
Any idea what may be the problem here ?

Error: No compatible version found: package-json#'^6.3.0'

I want to install latest version of NPM and running this
npm install latest-version
I receive
No compatible version found:package-json'^6.3.0
npm WARN package.json copy-descriptor#0.1.1 No readme data.
npm WARN package.json get-value#2.0.6 No readme data.
npm WARN package.json object-copy#0.1.0 No readme data.
npm WARN package.json static-extend#0.1.2 No readme data.
npm http GET https://registry.npmjs.org/latest-version
npm http 200 https://registry.npmjs.org/latest-version
npm http GET https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz
npm http 200 https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz
npm http GET https://registry.npmjs.org/package-json
npm http 200 https://registry.npmjs.org/package-json
npm ERR! Error: No compatible version found: package-json#'^6.3.0'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.2.0","1.0.0","1.0.1","1.0.2","1.1.0","1.2.0","2.0.0","2.0.1","2.1.0","2.2.0","2.2.1","2.3.0","2.3.1","2.3.2","2.3.3","2.4.0","3.0.0","3.1.0","4.0.0","4.0.1","5.0.0","6.0.0","6.1.0","6.2.0","6.3.0","6.4.0","6.5.0"]
npm ERR! at installTargetsError (C:\Program Files\nodejs\node_modules\npm\lib\cache.js:709:10)
npm ERR! at C:\Program Files\nodejs\node_modules\npm\lib\cache.js:631:10
npm ERR! at saved (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-registry-client\lib\get.js:138:7)
npm ERR! at FSReqCallback.oncomplete (fs.js:146:23)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-#googlegroups.com>
npm ERR! System Windows_NT 10.0.18362
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "latest-version"
npm ERR! cwd C:\Users\smuminov
npm ERR! node -v v12.13.0
npm ERR! npm -v 1.2.24
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\smuminov\npm-debug.log
npm ERR! not ok code 0
how to resolve this issue?
Current npm version - 1.2.24
Current node version - v12.13.0
You are using a very old version of npm.
Use the following command to update npm:
npm install npm#latest